MFC中如何獲取菜單項的名稱?
朋友請參考:
BOOL CACCESSDlg::OnCommand(WPARAM wParam, LPARAM lParam) { // TODO: Add your specialized code here and/or call the base class if(LOWORD(wParam)==file_new) { CString str_menustring=""; CMenu* menu=this->GetMenu(); menu->GetSubMenu(0)->GetMenuString(0,str_menustring,MF_BYPOSITION); MessageBox(str_menustring); } return CDialog::OnCommand(wParam, lParam); }