请问如何动态改变菜单中的文字

解决方案 »

  1.   

    GetMenuItemInfo 
    SetMenuItemInfo
      

  2.   

    对就是
    GetMenuItemInfo 
    SetMenuItemInfo
      

  3.   

    Use  OnUpdateCommandUI(CDUi *pDUI,..)
    {
        pDUI->SetText("Your want to change Twxt");ok!}
      

  4.   

    CMenu* mmenu = GetMenu();
          // Check the state of the "Test" menu item. Check the menu item
       // if it is currently unchecked. Otherwise, uncheck the menu item
       // if it is not currently checked.
       MENUITEMINFO info;
       char strText[20];   info.cbSize = sizeof (MENUITEMINFO); // must fill up this field
       info.dwTypeData=strText;
       info.cch=20;
       info.fMask = 0x40;//MIIM_STRING   
       VERIFY(mmenu->GetMenuItemInfo(ID_test_first, &info));   strcpy(strText,"更改中!");   
       SetMenuItemInfo(mmenu->m_hMenu,ID_test_first,false,&info);