|
aren't you missing a constructor ?
|
|
|
|
|
Your code is working fine in vc8.
|
|
|
|
|
I know that it can works...but I don't like the use of classes as they are structs (it is not everytime true): I prefere to use the constructors to initialize the members.
hope helps
Russell
|
|
|
|
|
Neither do I. I think is better to declare all parameters of a class and give them to void/null values in the constructor and in the destructor of the object, but not only the collections and similars that need to free memory; I do it with everything but simple C-types like int, double.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Russell
|
|
|
|
|
Hi all,
I am getting the followiing error:
error C2146: syntax error : missing ';' before identifier 'PVOID64'
When i am including the PlatformSDK above C:\\DXSDK\\lib i am not getting this error but in that case i am getting the following errors:
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(305) : error C2065: '_vsnprintf_instead_use_StringCbVPrintfA_or_StringCchVPrintfA' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(338) : error C2065: '_vsnwprintf_instead_use_StringCbVPrintfW_or_StringCchVPrintfW' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(5483) : error C2065: 'lstrcpy_instead_use_StringCbCopy_or_StringCchCopy' : undeclared identifier
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(5946) : error C2065: 'lstrcat_instead_use_StringCbCat_or_StringCchCat' : undeclared identifier
Please help me to resolve this.
Regards
|
|
|
|
|
Could be that the compiler does not know PVOID64 . Include the header where it is defined.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Maybe I'm mistaken, but don't the error messages state how you can resolve the errors?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Maybe I'm mistaken...
Indeed you are, Mark. Those error messages are plainly written in English. A person would have to go through great pains to decipher them.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
It seems you need to include a header file.
|
|
|
|
|
Hi
Can any one told me how we can use image for label of any button
in MFC button control.
Plz give me link of any application.
Regard's
Kaushik
|
|
|
|
|
search messages in codeproject or click here[^]
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You can load your image with CImage class and then use of m_Control.SetBitmap() for set image to button.
|
|
|
|
|
I have a one exe running how can I terminate it through another project.
|| ART OF LIVING ||
|
|
|
|
|
Use EnumProcesses, GetModuleFileNameExA, GetModuleBaseNameA, EnumProcessModules to get proper process handle. Then use ::TerminateProcess.
|
|
|
|
|
NishantB++ wrote: Then use ::TerminateProcess.
And what if that process is doing something important? TerminateProcess() should be used as a last resort.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: TerminateProcess() should be used as a last resort.
Or when your desired goal is to build a frail brittle software system... could happen.
|
|
|
|
|
led mike wrote: ... could happen
I'll go farther and say it happens often
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
TerminateProcess is the function of last resort. Try something "nice" first, like sending it a WM_CLOSE message.
|
|
|
|
|
Use FindWindow to get the handle of the window you want to close. Send WM_CLOSE message to this window.
|
|
|
|
|
|
Thanks everyone for sending reply,I will try sending WM_CLOSE
|| ART OF LIVING ||
|
|
|
|
|
I hope it solved your problem.
|
|
|
|
|
I am learning COM. And has come to know about one of the Advantages of the COM over .dll file. That
It extends the functionality of (client)application without rebuilding.
I.e. If you make the changes in function of .Dll File which client application is using you need to recompile the application. But if you are using the COM you dont need to do recompilation of client application
But How ?? afterall the COM (In-process COM) is also a .dll
|
|
|
|