ON_MESSAGE(ID,Handler) LRESULT Handler(WPARAM,LPARAM);//响应的函数 BEGIN_MESSAGE_MAP(CShellDlg, CDialog) 1. //{{AFX_MSG_MAP(CShellDlg) 2. ON_MESSAGE(WM_SENDOFFLINE, OnSendOffline) //自定义消息 3. ON_MESSAGE(WM_SWIPECARD, OnSwipeCard) //自定义消息 4. ON_MESSAGE(WM_MODEM, OnModem) 5.