以查看的方式从系统获取消息,可以不将消息从系统移除,非阻塞函数,当系统无消息,返回false,
继续执行后续代码
BOOL WINAPI PeekMessage(
_Out_ LPMSG lpMsg,
_In_opt_ HWND hWnd,
_In_ UINT wMsgFilterMin,
_In_ UINT wMsgFilterMax,
_In_ UINT wRemoveMsg
);
其中wRemoveMsg可以的取值是:
PM_REMOVE
PM_NOREMOVE
PM_NOYIELD
继续执行后续代码
BOOL WINAPI PeekMessage(
_Out_ LPMSG lpMsg,
_In_opt_ HWND hWnd,
_In_ UINT wMsgFilterMin,
_In_ UINT wMsgFilterMax,
_In_ UINT wRemoveMsg
);
其中wRemoveMsg可以的取值是:
PM_REMOVE
PM_NOREMOVE
PM_NOYIELD