类似于"选中"功能怎么做?
就是我点击一下,菜单项的左边会有一个对号出现,然后别的菜单项的对号消失

解决方案 »

  1.   

    UINT CheckMenuItem( UINT nIDCheckItem, UINT nCheck );
      

  2.   

    CheckMenuRadioItem function
    The CheckMenuRadioItem function checks a specified menu item and makes it a radio item. At the same time, the function clears all other menu items in the associated group and clears the radio-item type flag for those items.
      

  3.   

    GetMenu()->GetSubMenu(0)->CheckMenuItem(0, MF_BYPOSITION | MF_CHECKED);
      

  4.   

    响应菜单的updatecommand消息,比如有一个菜单命令为IDM_SHOW_STYLE_UP.在类向导里选择这个消息,然后进行处理.在这里的处理方式是各个菜单中是否需要被选中即可.
    void CRMSIMSView::OnUpdateShowStyleUp(CCmdUI* pCmdUI) 
    {
    if(g_iShowStyle==SS_UP)
    pCmdUI->SetRadio(TRUE);
    else
    pCmdUI->SetRadio(FALSE);
    }