class CBaseDialog : public CDialog { // Construction public: //CBaseDialog(CWnd* pParent = NULL); // standard constructor CBaseDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL ); DECLARE_DYNAMIC(CBaseDialog); // Dialog Data //enum { IDD = IDD_DIALOG1 }; //{{AFX_DATA(CBaseDialog) // NOTE: the ClassWizard will add data members here //}}AFX_DATA
void CBaseDialog::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default AfxMessageBox("Msg has been dilived to BaseDialog!"); CDialog::OnLButtonDown(nFlags, point); } 其他 对话框 无 OnLButtonDown 那么点击 对话框 (非控件),可以看到 "Msg has been dilived to BaseDialog!"