Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ProcessMessages.cpp « Windows « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f2841c17a8e654f336d647ee2162e1ad041aa04 (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); 
    } 
  } 
}

}