How do I close another program from my program
-
hi after i use ShellExecute() to run exe file i coudn't close it from my program by non of th function that i no like fileclose() so i need help to close exe file from my program :sigh:
-
toxcct wrote:
did you try CWnd::PostMessage(WM_CLOSE); ?
Humm... Nice .. But CWnd should be pointing to Other Window otherwise it will close it self! Better option will be ::PostMessage(WINDOW TO CLOSE HANDLE,WM_QUIT,...)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
hi after i use ShellExecute() to run exe file i coudn't close it from my program by non of th function that i no like fileclose() so i need help to close exe file from my program :sigh:
-
hi after i use ShellExecute() to run exe file i coudn't close it from my program by non of th function that i no like fileclose() so i need help to close exe file from my program :sigh:
you can try following CWnd *cwnd = FindWindow(NULL,"WINDOW_TO_FIND"); cwnd->PostMessage(WM_CLOSE,0,0); sanket patel