Disable popup menu
-
i tried this code but it didn't work : CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); CMenu * pSubMenu=pMenu->GetSubMenu(3); pSubMenu->EnableMenuItem( 1,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); in spite of this the following code is working properlly: CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); pMenu->EnableMenuItem(3,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); please any help, why this happen Best Regards :)
-
i tried this code but it didn't work : CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); CMenu * pSubMenu=pMenu->GetSubMenu(3); pSubMenu->EnableMenuItem( 1,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); in spite of this the following code is working properlly: CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); pMenu->EnableMenuItem(3,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); please any help, why this happen Best Regards :)
Which menu item are trying to disable ???
P.R.A.K.A.S.H
-
Which menu item are trying to disable ???
P.R.A.K.A.S.H
-
i tried this code but it didn't work : CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); CMenu * pSubMenu=pMenu->GetSubMenu(3); pSubMenu->EnableMenuItem( 1,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); in spite of this the following code is working properlly: CWnd *pMain=AfxGetMainWnd(); CMenu * pMenu=pMain->GetMenu(); pMenu->EnableMenuItem(3,MF_DISABLED| MF_GRAYED | MF_BYPOSITION ); please any help, why this happen Best Regards :)
See the FAQ: 7.1 In my MFC program, I'm trying to disable a menu item with EnableMenuItem(), but it doesn't have any effect on the menu. Why?[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- You cannot stop me with paramecium alone!