I want to make a program that will disable menu items of an appication for parental control using user32's enablewindow function. Using spy++ I can find buttons, controls etc, but I cannot seem to find menus and menu items. How could I find the handle for these so I could disable them when the user trys to click on them? Thanks
A:
I think this can be done (not very sure!) by hooking WH_CALLWNDPROC and handling WM_INITMENUPOPUP or WM_INITMENU messages. Some related discussions can be found here:
http://stackoverflow.com/questions/1320899/how-to-find-the-menu-item-if-any-which-opens-a-given-hmenu-when-activated
http://www.codeproject.com/KB/dialog/AOTop.aspx
swatkat
2009-09-05 14:12:02