Use OnUpdateCommandUI(CDUi *pDUI,..) { pDUI->SetText("Your want to change Twxt");ok!}
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);
SetMenuItemInfo
GetMenuItemInfo
SetMenuItemInfo
{
pDUI->SetText("Your want to change Twxt");ok!}
// 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);