Get caption of menu item of MS.Word
-
I have a trouble of getting the caption of a menu item when user use arrow key up/down to move the light on the menu. For example, with NotePade, I can hook WM_SELECTMENU to see the handle of a menu. So, I can use the API function "GetMenuString" to get the caption. However, with MS.Word, the menu is not the menu of the windows's system, so I can't get the caption of menu item by the above way. The menu class name used in MS.Word is "MsoCommandBar", I used Spy++ to see the messages related to this class. However, I can't get anything to solve my trouble. I'm in dark. Please, help me. Thanks a lot..
-
I have a trouble of getting the caption of a menu item when user use arrow key up/down to move the light on the menu. For example, with NotePade, I can hook WM_SELECTMENU to see the handle of a menu. So, I can use the API function "GetMenuString" to get the caption. However, with MS.Word, the menu is not the menu of the windows's system, so I can't get the caption of menu item by the above way. The menu class name used in MS.Word is "MsoCommandBar", I used Spy++ to see the messages related to this class. However, I can't get anything to solve my trouble. I'm in dark. Please, help me. Thanks a lot..
vtalau wrote:
However, with MS.Word, the menu is not the menu of the windows's system, so I can't get the caption of menu item by the above way. The menu class name used in MS.Word is "MsoCommandBar", I used Spy++ to see the messages related to this class. However, I can't get anything to solve my trouble. I'm in dark. Please, help me. Thanks a lot..
I did face the same problem sometime back. From MSDN: GetMenu does not work on floating menu bars. Floating menu bars are custom controls that mimic standard menus; they are not menus. To get the handle on a floating menu bar, use the Active Accessibility APIs.
Nibu thomas Software Developer
-
vtalau wrote:
However, with MS.Word, the menu is not the menu of the windows's system, so I can't get the caption of menu item by the above way. The menu class name used in MS.Word is "MsoCommandBar", I used Spy++ to see the messages related to this class. However, I can't get anything to solve my trouble. I'm in dark. Please, help me. Thanks a lot..
I did face the same problem sometime back. From MSDN: GetMenu does not work on floating menu bars. Floating menu bars are custom controls that mimic standard menus; they are not menus. To get the handle on a floating menu bar, use the Active Accessibility APIs.
Nibu thomas Software Developer
-
would you like to give me the pages which have information of the Active Accessibility APIs in detail, please?. I ever searched by Google with the key word of "Accessibility API", but I can find nothing related to my problems.
Even I did :-D
Nibu thomas Software Developer
-
Even I did :-D
Nibu thomas Software Developer