承接专栏《MFC工控项目实例之六CFile添加菜单栏》
1、在SEAL_PRESSUREDlg.h文件中添加代码
class CSEAL_PRESSUREDlg : public CDialog
{
...afx_msg void OnTypeManage();
...
}
2、在SEAL_PRESSUREDlg.cpp文件中添加代码
BEGIN_MESSAGE_MAP(CSEAL_PRESSUREDlg, CDialog)//{{AFX_MSG_MAP(CSEAL_PRESSUREDlg)
...ON_COMMAND(ID_MENUITEM32771, OnTypeManage)
... //}}AFX_MSG_MAP
END_MESSAGE_MAP()void CSEAL_PRESSUREDlg::OnTypeManage()
{// TODO: Add your command handler code hereCTypDlg dlg;dlg.DoModal();
}