1.首先添加资源文件
2.在对话框的.h里添加
protected:
CMenu m_menu; //菜单
XXXdlg.cpp加载菜单栏
//创建菜单
m_menu.LoadMenu(IDR_MENU1);
SetMenu(&m_menu);
//设置标记菜单
GetMenu()->GetSubMenu(0)->CheckMenuItem(2, MF_CHECKED|MF_BYPOSITION);
GetMenu()->GetSubMenu(0)->CheckMenuItem(IDR_MENU1, MF_CHECKED|MF_BYCOMMAND);