Reputation: 39550
Right now, I'm using:
TerminateProcess(pi.hProcess, 0)
... but this doesn't allow the application to clean up.
Our application has a wndProc function, but when I send WM_CLOSE...
PostThreadMessage(pi.dwThreadId, WM_CLOSE, 0, 0);
The function doesn't seem to be getting the message.
pi is of type: PROCESS_INFORMATION
Upvotes: 0
Views: 153
Reputation: 8851
Find your window handle (hWnd)
and call SendMessage(hWnd,WM_CLOSE,0,0);
Upvotes: 2