• Advertisement
Sign in to follow this  

Handling window messages

This topic is 2882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I would like to get the WM_SIZE message in my main loop through PeekMessage();, but this diesn't seem to work. I can handle it in the Window Procedure but the PeekMessage doesn't seem to catch it, any ideas? Thanks Alex

Share this post


Link to post
Share on other sites
Advertisement
You won't receive it there. AFAIK WM_SIZE is generated in an inner loop (not inside your code, in DefWindowProc) after the sizing ends.

That's with most windows messages, they are either generated by TranslateMessage or inside DefWindowProc.

You could probably set up some weird convoluted method to defer messages from WindowProc to your main loop but I don't think it'd be a good idea.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement