Jump to content
  • Advertisement
Sign in to follow this  
helloworld123

[win32 api] PeekMessage question

This topic is 3720 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

when you do a PeekMessage, does it remove that message from the message queue? if not, how do you remove it from the message queue without translatemessage()+dispatchmessage() method calls? thanks!

Share this post


Link to post
Share on other sites
Advertisement
The syntax of the PeekMessage function is:

BOOL PeekMessage(
LPMSG lpMsg,
HWND hWnd,
UINT wMsgFilterMin,
UINT wMsgFilterMax,
UINT wRemoveMsg
);

Quote:
Original post by helloworld123
when you do a PeekMessage, does it remove that message from the message queue?


If you tell it to do so, yes. That's what the wRemoveMsg parameter is there for. Set it to PM_REMOVE to remove any returned message or PM_NOREMOVE to leave them in the queue.

Share this post


Link to post
Share on other sites
Whether or not it's removed depends on what you specify for the wRemoveMsg parameter. PM_REMOVE will remove it, PM_NOREMOVE won't.

Also I don't mean to yell at you or anything since I don't mind answering questions, but in future you can probably get some answers a lot more quickly by reading the documentation for a specific function before creating a thread about it. Again I don't mind answering for you, I just think that MSDN is probably a lot quicker than I can be. [smile]

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!