在一个对话框mark.cpp中,自定义一个消息,
首先在mark.cpp中添加
#define WM_DATA WM_USER+100
之后再mark.h里
protected:
// Generated message map functions
//{
{AFX_MSG(MARK)
afx_msg void OnStart();
afx_msg void OnStop();
virtual BOOL OnInitDialog();
virtual void OnOK();
//}}AFX_MSG
afx_msg LRESULT OnData(WPARAM wParam,LPARAM lParam);//添加声明
DECLARE_MESSAGE_MAP()
再在mark.cpp中添加
BEGIN_MESSAGE_MAP(MARK, CDialog)
//{
{AFX_MSG_MAP(MARK)