how to enble menu item in a system menu?
-
iam unable to enablemenuitem from dialog system menu.. i worte like this : CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); here it is disabling menu item. after this again, i want to enable the menu item, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); but it is not working. might be some prob in my code. any body can help me ..
Regards, Srinivas
-
iam unable to enablemenuitem from dialog system menu.. i worte like this : CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); here it is disabling menu item. after this again, i want to enable the menu item, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); but it is not working. might be some prob in my code. any body can help me ..
Regards, Srinivas
Both
MF_DISABLED
andMF_ENABLED
work perfectly for me. I tried this in a dialog based application.«_Superman_»
I love work. It gives me something to do between weekends. -
Both
MF_DISABLED
andMF_ENABLED
work perfectly for me. I tried this in a dialog based application.«_Superman_»
I love work. It gives me something to do between weekends.dialog based application. but i have one window class which is derived from CWnd class. this window have only one close button. that button should be enabled/disabled in different situations. i worte like this for disabling: CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); same thing for enabled also, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); this is not working.
Regards, Srinivas