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

Menu Question

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++architecture
4 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    Abhijeet Pathak
    wrote on last edited by
    #1

    how can i know on which menu item, the mouse pointer is currently hovering in MFC doc/view architecture?

    N 1 Reply Last reply
    0
    • A Abhijeet Pathak

      how can i know on which menu item, the mouse pointer is currently hovering in MFC doc/view architecture?

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

      Abhijeet Pathak wrote:

      how can i know on which menu item, the mouse pointer is currently hovering

      Try WM_MENUSELECT.


      Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com

      A 1 Reply Last reply
      0
      • N Nibu babu thomas

        Abhijeet Pathak wrote:

        how can i know on which menu item, the mouse pointer is currently hovering

        Try WM_MENUSELECT.


        Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com

        A Offline
        A Offline
        Abhijeet Pathak
        wrote on last edited by
        #3

        thanks that works great for normal menu items... but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails. how can i retrieve caption of an menu item which contains popup (sub) menu. i'm facing difficulties because such menu items don't have an ID. :(

        N 1 Reply Last reply
        0
        • A Abhijeet Pathak

          thanks that works great for normal menu items... but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails. how can i retrieve caption of an menu item which contains popup (sub) menu. i'm facing difficulties because such menu items don't have an ID. :(

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

          Abhijeet Pathak wrote:

          but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails.

          When it's a popup menu then it won't have a command id but it will have an index right. You get index in LOWORD( WPARAM ). Use MF_BYPOSITION with GetMenuString to retrieve menu string. :~ Tell me if it works.


          Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com

          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