|
-
March 27th, 2007, 09:04 AM
#1
How to Disable a Menu Item In Win32 SDK
Hi,
Can anybody tell me how to disable a menu item in Win32 SDK environment.
I am working on "Windows Mobile 5.0 Smartphone".
Regards
Sudha
-
March 27th, 2007, 09:17 AM
#2
Re: How to Disable a Menu Item In Win32 SDK
Well, how are you displaying your menus?
The usual technique is to eneble/disable menu items directly before displaying them.
-
March 27th, 2007, 03:08 PM
#3
Re: How to Disable a Menu Item In Win32 SDK
Code:
HMENU hResMenu = LoadMenu(g_hinst, MAKEINTRESOURCE(nMenuId));//g_hinst->Handle to the module containing the menu resource to be loaded.
HMENU hMenu = GetSubMenu(hResMenu,0);
EnableMenuItem(hMenu, ID_COMMAND_START, MF_BYCOMMAND | MF_DISABLED);
"Dont Forget to rate if it helped"
-
March 27th, 2007, 03:11 PM
#4
Re: How to Disable a Menu Item In Win32 SDK
Use MF_GRAYED rather than MF_DISABLED. And get some reading on those flags in MSDN.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|