title: WM_WINDOWPOSCHANGING and main window visibility issue
body: <p>I have a large C++/MFC application that can start in two modes: 1) regular GUI mode and 2) special mode when it was started with command line parameters in which case the GUI part of the program is not shown but instead I add an icon to the notification (system) tray.</p>
  
  <p>To ensure that the main window is not shown for mode 2 I process the WM_WINDOWPOSCHANGING as follows:</p>
  
  <pre><code>void OnWindowPosChanging(WINDOWPOS* lpwndpos)
  {
      CDialog::OnWindowPosChanging(lpwndpos);
  
      // TODO: Add your message handler code here
  
      //Prevent main window from showing
      lpwndpos-&gt;flags &amp;= ~SWP_SHOWWINDOW;
  }
  </code></pre>
  
  <p>The issue happens if after processing this message the logic determines an error in a command line and wants to show the main window. But I can't seem to show the main window after processing the WM_WINDOWPOSCHANGING message like I showed above.</p>
  
  <p>PS. The project is C++ MFC written for Visual Studio 2008.</p>