Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get caption of menu item of MS.Word

Get caption of menu item of MS.Word

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelptutorial
5 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vtalau
    wrote on last edited by
    #1

    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..

    N 1 Reply Last reply
    0
    • V vtalau

      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..

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • N Nibu babu thomas

        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

        V Offline
        V Offline
        vtalau
        wrote on last edited by
        #3

        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.

        N 1 Reply Last reply
        0
        • V vtalau

          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.

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          Even I did :-D


          Nibu thomas Software Developer

          V 1 Reply Last reply
          0
          • N Nibu babu thomas

            Even I did :-D


            Nibu thomas Software Developer

            V Offline
            V Offline
            vtalau
            wrote on last edited by
            #5

            would you like to give me a small example code to do that, please?. I'm a student, I'm fond of Win32, I'm trying to do that.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups