15,473
社区成员




DWORD dwCurThreadID = GetCurrentThreadId();
int i = 0;
for (; i < INT_MAX; ++i)
{
// if (!PostMessage(WM_USER, 1, 2))
if (!PostThreadMessage(dwCurThreadID, WM_USER, 1, 2))
{
break;
}
}
DWORD dwCountAllEvents = 0xFFFF & GetQueueStatus(QS_ALLEVENTS);
DWORD dwCountALLINPUT = 0xFFFF & GetQueueStatus(QS_ALLINPUT);
DWORD dwCountQS_ALLPOSTMESSAGE = 0xFFFF & GetQueueStatus(QS_ALLPOSTMESSAGE);
CString str;
str.Format(_T("Queue Length: %d \r\n dwCountAllEvents: %u \r\n dwCountALLINPUT: %u \r\n dwCountQS_ALLPOSTMESSAGE: %u ")
, i, dwCountAllEvents, dwCountALLINPUT, dwCountQS_ALLPOSTMESSAGE
);
AfxMessageBox(str);