7zip/CPP/Windows/ProcessMessages.cpp

23 lines
355 B
C++
Raw Normal View History

2021-12-27 01:00:00 +01:00
// Windows/ProcessMessages.cpp
#include "StdAfx.h"
#include "ProcessMessages.h"
namespace NWindows {
void ProcessMessages(HWND window)
{
MSG msg;
while (::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) )
{
if (window == (HWND) NULL || !IsDialogMessage(window, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
}