title: Proper macro for BOOL CDialog::OnCommand(WPARAM wParam, LPARAM lParam)
body: <p>I'm porting to VS2017 an application previously compiled with VS6. Here's a piece of code that doesn't compile:</p>
  
  <pre><code>BEGIN_MESSAGE_MAP(CVBindings, CDialog)
      //{{AFX_MSG_MAP(CVBindings)
     ON_COMMAND( IDC_BALT, OnCommand )
     ON_COMMAND( IDC_BCONTROL, OnCommand )
     // ...
      //}}AFX_MSG_MAP
  END_MESSAGE_MAP()
  </code></pre>
  
  <p>The compiler error is:</p>
  
  <pre><code>error C2440: 'static_cast': cannot convert from 'BOOL (__thiscall CVBindings::* )(WPARAM,LPARAM)' to 'AFX_PMSG'
  note: None of the functions with this name in scope match the target type
  </code></pre>
  
  <p>The function is declared as:</p>
  
  <pre><code>class CVBindings : public CDialog {
      // ...
      virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
      // ...
  };
  </code></pre>
  
  <p>This declaration matches the signature of <code>CWnd::OnCommand</code> so to override it.</p>
  
  <p>However, it seems that I need to use other macro than <code>ON_COMMAND</code> . Could you suggest which one and how to use it? (I'm not familiar with MFC at all)</p>
  
  <p>UPDATE: as requested in the comments, below are the pieces of the definition for <code>CVBindings::OnCommand</code>:</p>
  
  <pre><code>BOOL CVBindings::OnCommand(WPARAM wParam, LPARAM lParam) 
  {
      // ...
      // Some logic using just LOWORD(wParam), returning TRUE in some cases
      // ... 
      // Otherwise
      return CDialog::OnCommand(wParam, lParam);
  }
  </code></pre>