How to close A particular instance with WM_CLOSE
-
I have opened multiple instances of an APPLICATION using createprocess. No I need to close one particular window using WM_CLOSE. I need to know how I do it?
punav wrote:
No I need to close one particular window using WM_CLOSE.
From another application? What all information do you have about that information of the application( process handle, process Id, window handle etc )?
-
I have opened multiple instances of an APPLICATION using createprocess. No I need to close one particular window using WM_CLOSE. I need to know how I do it?
CreateProcess
has aPROCESS_INFORMATION
structure as the last parameter. You can use thedwThreadId
member of this structure and theWM_QUIT
message to close a window using thePostThreadMessage
API.::PostThreadMessage(pi.dwThreadId, WM_QUIT, 0, 0);
«_Superman_» I love work. It gives me something to do between weekends.