title: AfxMessageBox going on background
body: <p>In a connection check i am showing a modal dialog to ensure the connection. But to give people escape from the modal dialog i want to a message box to keep try connection or exit the application.</p>
  
  <h2>Source Code :</h2>
  
  <pre><code>void CRoboVibMainFrame::OpenSystemSettingsDialog(int activeTabIndex /*= 0*/)
  {
  
  while (activeTabIndex &gt;= 0)
  {
      m_settingsDialog = std::make_unique&lt;SettingsDialog&gt;(this,activeTabIndex);
      m_settingsDialog-&gt;DoModal();
      activeTabIndex = GetNotConnectedPSVControl();
      if (AfxMessageBox(Polytec::Text::ToMessageString(IDS_PSV_SYSTEM_EXIT_WINDOW_MSG), MB_YESNO) == IDNO)
      {
          ::ExitProcess(0);
          break;
      }
  }
  }
  </code></pre>
  
  <p>But the Messagebox is alway showing in the background. I want it on front. What is wrong in my code? Please suggest.</p>