title: SendMessage() not working in MFC application
body: <p>I have a MDI MFC application, where I want to use SendMessage() from a CPropertieswnd class to invoke a function in CMainFrame class. The custom message is defined as:</p>
  
  <pre><code>#define WM_CUSTOM (WM_APP + 10)
  </code></pre>
  
  <p>The messagemap in Mainframe.cpp is :</p>
  
  <pre><code>ON_COMMAND(WM_CUSTOM , &amp;CMainFrame::OnFileNewType1)    
  </code></pre>
  
  <p>In Propertieswnd.cpp file the message is sent:</p>
  
  <pre><code>AfxGetMainWnd()-&gt;SendMessage(WM_CUSTOM);
  </code></pre>
  
  <p>But the OnFileNewType1() function was never called. Can anyone please guide me which point I am missing ?</p>