title: MFC: Prevent CDialog from being hidden when main window is minimized?
body: <p>I have a derived CDialog (actually CBCGPDialog) that was created with a NULL parent window.   Yet, when I minimize the main program the dialog goes away.   If I do something like:</p>
  <pre><code>void CMyDlg::OnShowWindow(BOOL bShow, UINT nStatus)
  {
    CBCGPDialog::OnShowWindow(bShow, nStatus);
    
    if (bShow==0 &amp;&amp; nStatus==SW_PARENTCLOSING) {
      ShowWindow(SW_SHOWNORMAL);
    }
  }
  </code></pre>
  <p>It will open it back up but there is a flash.   Where would I catch the minimize request in <code>CMyDlg</code> to prevent it from minimizing?  (This dialog only has a close option on it, so if they don't want it shown, they would close it, it contains more of a window to show stuff than a normal dialog of options,  maybe I should move it to a <code>CWnd</code>?)</p>