title: MFC DoModal Dialog
body: <p>Okay, so I will admit I have no knowledge of windows API or even MFC.</p>
  
  <p>I've got an error window popping up when things go hairy (illegal character in a filename string) and I want the error box to be modal.</p>
  
  <p>For the life of me I can't figure out why it crashes when it hits doModal.</p>
  
  <p>Here is the code where I think this can be fixed.  This code is in the event handler of a button in the main window.</p>
  
  <pre><code>CDialog *BadFileD = new CDialog();
  BadFileD-&gt;Create(IDD_STATUS, this); 
  BadFileD-&gt;DoModal();
  </code></pre>
  
  <p>Am I just being borderline retarded?</p>