查原代码
#define ON_COMMAND(id, memberFxn)  { WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)id, AfxSig_vv, (AFX_PMSG)&memberFxn },
// ON_COMMAND(id, OnFoo) is the same as
//   ON_CONTROL(0, id, OnFoo) or ON_BN_CLICKED(0, id, OnFoo)
下边注释说的很清楚。

解决方案 »

  1.   

    vc带的,在\Microsoft Visual Studio\VC98\MFC\SRC下。run-time原码在\Microsoft Visual Studio\VC98\CRT\SRC(选择安装)
      

  2.   

    MSDN中的注释:
    The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.愿意是说:
    当用户选择了一个菜单中的项目,或者一个控件给它的父窗口发送一条通知的消息,或者一个加速键被按下的时候,就会发送一条WM_COMMAND消息。