ON_MESSAGE macro doesn't make sense in non-CWnd derived classes

来源:互联网 发布:五轴编程月薪多少 编辑:程序博客网 时间:2024/04/29 16:09

看msdn,突然看到这样一句话,why?

#define ON_MESSAGE(message, memberFxn) /
 { message, 0, 0, 0, AfxSig_lwl, /
  (AFX_PMSG)(AFX_PMSGW)(LRESULT (AFX_MSG_CALL CWnd::*)(WPARAM, LPARAM))&memberFxn },
其中的指针,memberFxn,必须是指向CWnd类成员函数的指针

所以,就不要对CDocument之类的非CWnd类SendMessage(WM_USER+n)了。

原创粉丝点击