title: CWnd::OnCreate function never get called
body: <p><strong>Overview:</strong><br>
  I have 2 utilities and both have same common interface i.e. open a dialog box to "request for username".<br>
  The code for "requesting username" is written in different library and both these utilities call that library .</p>
  
  <p><strong>ISSUE:</strong>  </p>
  
  <p>In 1 utility it works fine and I got this this dialog box which request username but in other utility it doesn't come up.</p>
  
  <p><strong>MY Investigation:</strong>
  ON deeper investigation I found that both these utilities call CDialog::DoModal() which in turns call onCreate() . In my other utility breakpoint never hits onCreate function . Any idea why ?</p>
  
  <p>sample code</p>
  
  <pre><code>// IN actual Utility
  //somewhere in code 
  
  Dialog_for_common_interface dlg( message.c_str(), "Please enter username:" );
  
          CString username;
  
          bool is_correct = ( dlg.DoModal(username) == IDOK )
  
  // IN Dialog_for_common_interface
  
  int  Dialog_for_common_interface::DoModal ( CString &amp;_reply_c )
  {
      int result_i = CDialog::DoModal(); // break point hits this but value of result_i = -1;
  
      if ( result_i == IDOK )
      {
          _reply_c = reply_c;
      }
  
      return result_i;
  }
  
  // Breakpoint nver hits the below function
  
  int Dialog_for_common_interface::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  {
      if (CDialog::OnCreate(lpCreateStruct) == -1)
          return -1;
  
      SetWindowText( title_c );
  
      return 0;
  }
  </code></pre>