How to change menu item propeties ?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
-
Hi, How can I change the menu item properties dynamically? basically, I want to have the menu caption "Running!" when a certain code in my application is running and "Stopped" when the code is in standby. Thank you for your help Zakaria :confused:
Add a handler for the update of the menu item eg:
void CDocClass::OnUpdateMenuItemName(CCmdUI* pCmdUI)
{
if (m_bRunning)
pCmdUI->SetText(_T("Running"));
else
pCmdUI->SetText(_T("Stopped"));
}Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)