Disable menu items.
I am trying to figure out how to disable a menu item that is another popup. I would like to disable the 'File|Data' menu item instead of having to disable all the items seperately listed in this popup. I have attached a pict. for clarity.
Hopefully, I have explained myself adequately.
but this doesn't
EnableMenuItem(hMenu, IDM_FILE_DATA_INPUT, MF_GRAYED);
EnableMenuItem(hMenu, IDM_FILE_DATA_OUTPUT, MF_GRAYED);
EnableMenuItem(hMenu, IDM_FILE_DATA, MF_GRAYED);
try MF_GRAYED|MF_DISABLED as a parameter, not sure if it will work, but it's worth the try
check that out if you haven't already
Well I guess I should have said so but I tried MF_DISABLED also to no avail.
My browser is giving me some difficulties, so I can't see the link but when I get to my broadband connection tomorrow I'll give it a look!
GetSubMenu() to find the Data popup menu handle, then disable it
(as a long shot)
EnableMenuItem(hMenu, IDM_FILE_DATA, MF_BYCOMMAND|MF_GRAYED);//use the popups ID
try the 'by position' flag for the DATA item (3 I think, zero based counting from the top down?)
When I get off work I'll give those a try. I had some spyware that wouldn't let me view the link of MS site.