Modify menu

Modify menu

I would like to know how we can disable the main menuitems like the File,Edit, Help, etc so that I don't have to individually modify each subitem.Thanks in advance,

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Use either

dummyl=EnableMenuItem(ghchildMenu, indItem+1, MF_GRAYED+MF_BYPOSITION)


dummyl=EnableMenuItem(ghchildMenu, IDM_FILE, MF_GRAYED+MF_BYCOMMAND)

(+1 in the first example is because the first (File) menu is numbered 0).
Note that you have to call DrawMenuBar(hwndParent) immediately after to update the change.

To change menu string, use:

dummyI = ModifyMenu(hMenu, IDM_SOMETHING, MF_BYCOMMAND+MF_STRING, 0, LOC("&NewString"C)).

Leave a Comment

Please sign in to add a comment. Not a member? Join today