المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Examining a Message Queue



C++ Programming
08-12-2009, 01:16 PM
This may be a stupid question but why is the Following code "while (PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE))"

called examing the message queue in the MSDN documentation

If all I want to do is examine if a message has come in shouldn't I use PeekMessage with PM_NOREMOVE

and then if its the message I want pull the message off the queue via PeekMessage PM_REMOVE, GetMessage

or I am using Messagemaps Use the Macros to Pull off the message and go to appropriate rtn to process my message