Hi,
I want to enable/disable a menu item and don't understand how to get the handle to the menu or to menu items.
Any help in this matter is appreciated.
Thanks! - Mark Wright
Hi,
It looks like I solved my own problem. Menu items can be controlled through windows.
To disable my menu item I wrot:
Invoke GetMenu, hWnd ;handle to window with the menu
Invoke EnableMenuItem, Eax, IDM_WINDOW1_EASYCODE, MF_GRAYED ;the menu item created with menu editor
to enable,
Invoke GetMenu, hWnd
Invoke EnableMenuItem, Eax, IDM_WINDOW1_EASYCODE, MF_ENABLED
can be used.
Hope this helps someone else - Mark Wright
Hi and happy new year to everybody!
Effectively, you solved your problem very well. The EnableMenuItem function is the solution.
Regards ,
Ramon