title: Window message WM_SIZING sending incessantly when window resizing
body: <p>I make small game and have some problem with low priority window messages, that incessantly sending from system and block running game logic's code.</p>
  
  <p>I create my message loop something like this:</p>
  
  <pre><code>bool Window::SystemRoutineAndCheckQuit() {
      ::MSG msg;
      while( ::PeekMessage( &amp;msg, nullptr, 0, 0, PM_REMOVE ) ) {
          if( msg.message == WM_QUIT ) {
              ::UnregisterClass( registeredClassName, ::GetModuleHandle( nullptr ) );
              DLOG( lg ) &lt;&lt; "Exit from system loop" &lt;&lt; DLOG_END;
              return false;
          }
  
          ::TranslateMessage( &amp;msg );
          ::DispatchMessage( &amp;msg );
      }
  
      return true;
  }
  //....
      while( window.SystemRoutineAndCheckQuit() ) {
          // do all render and logic
      }
  </code></pre>
  
  <p>I.e. before every frame I wanna process all messages from windows and then, when queue will empty do all logic. I notice when window resizing I get same message WM_SIZING again and again and queue never will empty when mouse button still press (even when size of window don't change from previos call I receive message with same window coordinates). So it block execute my code.</p>
  
  <p>Is there any other messages, that keep windows message queue don't empty and what is the best way to process all messages without some low priority, like WM_SIZING?</p>
  
  <p>I test it on Windows 8.</p>
  
  <p>PS: I need resize window, so I don't wanna disallow it by change style.</p>
  
  <p><strong>EDIT:</strong> sorry for incorrect description problem, but found what real happened (and why my previously attempt to fix it by limit number of processed messages, or by break message process when get same message two times in sequence will not success). From PeekMessage I get message WM_NCLBUTTONDOWN and after this message program don't return from ::DispatchMessage and block continue execution of thread until mouse will be released. And when program in DispatchMessage, my handler get repeatly WM_SIZING or WM_MOVING (independently what return from message handler function (result of DefWindowProc, TRUE (message was processed) or 0).</p>