tombrum
10-11-2003, 10:32 AM
Hi all, i wonder if someone can give me an example of a working WM_SYSCOMMAND in action closing down internet explorer. If you can i would be very very gratefull
I believe that, in the general case of closing other application windows, it's possible that the target application might not do all its normal shutdown processing if you simply post a WM_CLOSE.
The best method, I think, is to post a WM_SYSCOMMAND with the SC_CLOSE parameter - this is the closest you can get to a simulation of the user clicking on the X (Close) button of the window.
And whichever way you do it, as Red Bull has noted, it should be Posted, not Sent.
Dr Memory :cool:
I believe that, in the general case of closing other application windows, it's possible that the target application might not do all its normal shutdown processing if you simply post a WM_CLOSE.
The best method, I think, is to post a WM_SYSCOMMAND with the SC_CLOSE parameter - this is the closest you can get to a simulation of the user clicking on the X (Close) button of the window.
And whichever way you do it, as Red Bull has noted, it should be Posted, not Sent.
Dr Memory :cool: