>>>< snipped >
>>>>
>>>>WM_QUIT should tell the App to shut down, as opposed to WM_CLOSE, which tells the Window to close. Closing the top-level Window of an SDI app through WM_CLOSE should shut it down; WM_CLOSE to an MDI app shuts down the Window, but can leave other top-levels running.
>>>
>>>Thanks. I tried this on Outlook and SDK Help so my guess is both are SDI applications. Although, I still don't know why they didn't QUIT. Mystery of nature...
WM_QUIT
>>The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the PostQuitMessage function. It causes the GetMessage function to return zero.
>>
>>A window receives this message through its WindowProc function.
>>BTW, the recommendation is to use PostQuitMessage() rather than PostMessage().
>
>After some more reading and some more testing, it seems SendMessage doesn't add a message to the message queue, it expects something to be listening 100% of the time to act on it. For whatever reason, the WindowProc function ignored repeated messages of this type. It prcessed them because control did return to my program and I did get the expected return value of 0.
>
>The WM_CLOSE message appears to be a proactive message that tells a window it needs to do something.
>
>Also, I was playing with the PostMessage and PostQuitMessage. It appears that PostQuitMessage is scoped to the current thread. If you want to quit your app from within your app, then use PostQuitMessage otherwise, use PostMessage with the WM_QUIT meesage. This does work to kill the application.
Yep.