Sign in to follow this  
A_B

Handling window messages

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this