summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/Windows/ProcessMessages.cpp
blob: 0f48aee25627407f6d357126fd3335d5b255fee9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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);
    }
  }
}

}