我有modHolder类对象
class modHolder : public CWinThread
{
DECLARE_DYNCREATE(modHolder)
protected:
modHolder();
virtual ~modHolder();
public:
CMainWindow * v1;
virtual BOOL InitInstance();
virtual int ExitInstance();
protected:
DECLARE_MESSAGE_MAP()
};
创建如下:
AfxBeginThread(RUNTIME_CLASS(modHolder));
我的框架内有按钮:
class CMainWindow : public CFrameWnd
{
public:
CMainWindow ();
CButton m_wndPushButton;
protected:
afx_msg LRESULT OnMyMessage1(WPARAM wParam, LPARAM lParam);
afx_msg int OnCreate (LPCREATESTRUCT lpcs) ;
afx_msg void OnPaint ();
afx_msg void OnPushButtonClicked ();
DECLARE_MESSAGE_MAP ()
};
当我按下按钮时,不显示任何可见消息:
void CMainWindow::OnPushButtonClicked ()
{
MessageBox (_T ("bbb"),_T ("Error"), B_ICONINFORMATION | MB_OK);
//AfxMessageBox("aaaa");
}
但是消息函数不会返回。为什么消息不可见?