|
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
|
|
|
|
|
GauranG033It extends the functionality of (client)application without rebuilding.
That's the same as with a dll. Are you sure they were saying that you cannot do that with a dll ? Where did you read that ?
|
|
|
|
|
Hey thnx. This is the article I am refering to learn the COM component.
http://www.codeproject.com/com/COM_from_scratch_2.asp[^]
I don't know its my mistake in understanding the concept or its authors mistake.
just find out the following line in the below link and the paragraph above it says what creates a doubt in my mind
Conclusion: COM extends functionalities of applications without rebuilding
|
|
|
|
|
GauranG033 wrote: This is the article I am refering to learn the COM component.
I would not recommend that as a beginner COM article. That article is dealing with a very specific subject, it does not appear to be "beginning COM" article.
GauranG033 wrote: It extends the functionality of (client)application without rebuilding.
The article that is from is about building a component "factory". It just happens to use COM. The "factory" concept could be reproduced using native C++ and DLL's without any COM. So your statement that this is an "advantage of COM over DLL" is not true.
|
|
|
|
|
If you are not changing the signature of a dll function, you need not to recompile the application again.
This is the same case with com.
There is one property of a COM that once an Interface is published, it is not changed any more.
This means that once you write any function in an interface, you are not going to change it's signature.
If you want to do so, you need to publish a different interface with new function signature.
So Now all you got is a com component with two different interfaces that are exporting two versions of your function.
So in this case, your application need not to recompile, cause the function it wants still exist there.
|
|
|
|
|
is that mean everytime I will add some new function and Compile it. It will generate new Interface with differnet version number.
|
|
|
|
|
It is your duty to follow the rules.
But you can surely add more functions to the existing interface you created.
I will try to explain the need of not modifying existing functino using a simple example.
Suppose an Application A is using a dll D. Another application A2 is also using the same dll D. Now if the user installs new version of A2 in which the dll D function signatures got changed, then the user can't use application A.
To avoid this situation, people often use version no. in the dll name for ex. MFC42.dll.
Now if you are using COM, you will write new interface if the function signature chanes, without changing the earlier one, so both the applications will work even after installing new versions of application A2.
|
|
|
|