   [win32 api] PeekMessage question
  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!   
  up!   ;  The syntax of the PeekMessage function is:BOOL PeekMessage(    LPMSG lpMsg,    HWND hWnd,    UINT wMsgFilterMin,    UINT wMsgFilterMax,    UINT wRemoveMsg);Quote:Original post by helloworld123when 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.;  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]