Original Post
Okay i''m new to this forum, so first of all: Hi to everyone
Ok, to the business now...
I''m working on some piece of window handling code.
And i need to test for a WM_CLOSE message before i dispatch it to the message handler.
I tried the following:
// following code is implemented in a class method
// receivedCloseMessage is a boolean class property
MSG msg;
while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE )){
if( WM_CLOSE == msg.message ) receivedCloseMessage = true;
TranslateMessage( &msg );
DispatchMessage( &msg );
}
But the WM_CLOSE message doesn''t seem to show up there.
However it will show up in the message handler itself.
I''m also not able to test for WM_DESTROY messages.
Only message that i can seem to test for is the WM_QUIT message.
Does anyone have a clue as to why i''m unable to find WM_CLOSE or WM_DESTROY messages in my message dispatching code ?