title: "The Parameter Is Incorrect" MFC exception
body: <p>This is native C++. No .NET framework involved.</p>
  
  <p>I am trying to figure out which exception is thrown when the CListBox gets an invalid parameter. Turns out MFC uses this exception quite a lot but I can't determine the actual exception type thrown. I have tried a lot of different types on the catch (int, const char <em>, std:</em>) but the only one besides catch(...) that catches it is the (const void *). Looking the memory structure, I still don't have a clue what is actually thrown.
  Does any one know what it is or how to determine what it thrown?</p>
  
  <p>This is a sample MFC application. ListBox is a CListBox. The application is nothing more than the default DialogBox based MFC application that VS builds automatically. The only change is that I added a list box and the code you see below in the OK button handler.</p>
  
  <pre><code>void CMFCApplication1Dlg::OnBnClickedOk()
  {
      try
      {
          CString Value;
          ListBox.GetText( -1, Value );
          Value = "none";
      }
      catch ( CException &amp; exception )
      {
              exception.Delete();
      }
      catch ( const void * e )
      {
      }
      catch (...)
      {
      }
  
      CDialogEx::OnOK();
  }
  </code></pre>