I have derived a class from CListBox. It has 10 items. But its size is of 20 items. To reduce flicker I have Overridden the OnEraseBackground method to return true. I have also Overridden DrawItem. The DrawItem is called only 10 times, once for each item. I want to color the remaining part of the list. Can anyone suggest the most ...
Hi,
I've declared a uint8 variable and when the value in it is printed, I get smiley faces and white spaces. Shouldn't it display integer values?
...
I understand the C++ and C syntax, but im a little unsure how i am supposed to code in the VS2010 environment, when i create a project i am presented with folders such as headers and sources.
What c++ code goes into which folder?
Also, how would it work for C?
...
i know wat function to use but i can't get it to workd right. i use SetCursorPos() the only problem is that it sets the cursor not to the windows coordinates but to the screen coordinates. i also tried the ScreenToClient() but it didn't work ethier.
here is my code
pt.x=113;
pt.y=280;
ScreenToClient(hWnd, &pt);
SetCursorPos(pt.x, pt.y);...
When you are debugging a program and you hover over a GUID variable, MSVC retrieves both the variable name (e.g. CLSID_FilterGraph) and the human name (e.g. Filter Graph Object).
It does the second by looking at HKCR\CLSID\GUID - but where does it get the variable name from?? It's not in the registry.
Any ideas?
...
Anyone know how to convert BSTR to char* ?
update:
I try to do this, but dont know either it is right or wrong..
char *p= _com_util::ConvertBSTRToString(URL->bstrVal);
strcpy(testDest,p );
...
How to declare and compare the strings?
// test ="my test string";
char testDest[256];
char *p= _com_util::ConvertBSTRToString(URL->bstrVal);
strcpy(testDest, p);
How can I compare test with testDest?
...
How to programmatically send WM_PAINT from my c++ program?
...
Hello
According to
http://stackoverflow.com/questions/115703/storing-c-template-function-definitions-in-a-cpp-file
it is easy to seprate the interface and the implementation of a template class,
.h file
template<typename T>
class foo
{
public:
foo();
~foo();
void do(const T& t);
};
.cpp file
template <ty...
Hi,
I'm attempting to use the boost library in my C++ project (Visual Studio 2008).
However on including the boost functions for time:
#include <boost/date_time/gregorian/gregorian.hpp>
I get the following error (along with a number of warnings):
fatal error LNK1104: cannot open file 'libboost_date_time-vc90-mt-gd-1_44.lib'
...
I am trying to build a project created in VS 6 with VS 2010. When I open .dsw file, VS converts the project asking me this message:
"... ProjectName.dsp must be converted to the current Visual C++ project format. After it
has been converted, you will not be able to edit this project in previous versions of
Visual Studio.
Convert and op...
I am taking the URL value from DocumentComplete and try to copy it to testDest[256]
Here is my code:
char *p= _com_util::ConvertBSTRToString(url->bstrVal);
for (int i = 0; i <= strlen(p); i++)
{
testDest[i] = p[i];
}
My question is, how can I print the testDest value on a messagebox?
...
I have a function that creates and insert some numbers in a vector.
if(Enemy2.dEnemy==true)
{
pt.y=4;
pt.x=90;
pt2.y=4;
pt2.x=125;
for(int i=0; i<6; i++)
{
Enemy2.vS1Enemy.push_back(pt);
Enemy2.vS2Enemy.push_back(pt2);
y-=70;
pt.y=y;
...
My c++ visual 2010 don't want open new project, every time when I put name of the project and click OK button after that it open my internet browser instead of Win32 Application Wizard. For better demonstration i record my steps here :
http://tinypic.com/player.php?v=iqxzk4&s=7
...
Hi, I need to draw extensive realtime graphics on WinCE platform.
For that purpose, which language is better between VC++ and C# to get high performance?
Moreover, the graphics application that we would be developing should be linked to currently existing c++ modules. If writing intermediate layer involves lot of effort if we choose c#, ...
While reviewing Visual C++ codebase I found a following strange thing. A run-time assert (which is check the condition and throw an exception if the condition is violated) was used in a case when the condition could be evaluated at compile time:
assert( sizeof( SomeType ) == sizeof( SomeOtherType ) );
clearly the compiler will evaluat...
Hi,
I have a server client system where the server is a vc++ program and the client is in R.
Can I use a shared memory between these two? with boost::interprocess at the vc++ end and R bigmemory at the R end?
the server and the client are on the same pc
...
In the application I develop, the database table having a column of 'image' datatype. Now I want to insert the values into that table directly from my program, which is in VC++ 6.0, using a direct ExecuteQuery() of INSERT(due to performance considerations). The image column is been mapped to the structurre of the following declaration
t...
Does anyone know how could I find out which are cl.exe's builtin/predefined macros?
For example for gcc the following command line will list all the compiler's builtin macros
gcc -dM -E - </dev/null
EDIT: I'm interested in a way similar to gcc's that is "ask the actual compiler".
Thanks
...
hi,
i ve same problem. i ve setup all configuration which is mentions in below points but can't find any solution
Configuration points are
To choose the x64 platform, click Build > Configuration Manager. Under Active Solution Platform, select In the dialog that comes up, select x64 as the new platform (it may come up by default) and...