|When I right-click an item in a list control, I'm using the following code to display a popup/context menu. That part works fine. I then want one of the items in that menu to be disabled. That part does not work.
void CMyView::OnRightClick( NMHDR *pNMHDR, LRESULT *pResult )
pSubMenu = menu.GetSubMenu(0);
pt = GetMessagePos();
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN, pt.x, pt.y, this);
*pResult = 0;
void CMyView::OnUpdateShowData(CCmdUI *pCmdUI)
}As a matter of fact,
OnUpdateShowData() does not get called until after I select the menu item, thus it has no chance to disable it. Any ideas?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius