MFC的消息映射问题
#defineON_WM_PAINT()\{WM_PAINT,0,0,0,AfxSig_vv,\(AFX_PMSG)(AFX_PMSGW)(void(AFX_MSG_CA...
#define ON_WM_PAINT() \
{ WM_PAINT, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnPaint },
就以WM_PAINT消息为例,在CFrameWnd中有afx_msg void OnPaint(); 所以OnPaint是个非静态的成员函数了,而成员函数不是要有了对象才能被调用吗?????而上面的宏中时&OnPaint 并没有对象, 新手求解释 展开
{ WM_PAINT, 0, 0, 0, AfxSig_vv, \
(AFX_PMSG)(AFX_PMSGW)(void (AFX_MSG_CALL CWnd::*)(void))&OnPaint },
就以WM_PAINT消息为例,在CFrameWnd中有afx_msg void OnPaint(); 所以OnPaint是个非静态的成员函数了,而成员函数不是要有了对象才能被调用吗?????而上面的宏中时&OnPaint 并没有对象, 新手求解释 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询