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. How to stop popup menu from closing?

How to stop popup menu from closing?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 2 Posters 3 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.
  • Z Offline
    Z Offline
    z33z
    wrote on last edited by
    #1

    How do you stop a popup menu from closing when clicking with mouse button? What I want to do is to create a CMFCDropDownListBox with check boxes (to create a drop list with check boxes). I've created a derived class of CMFCDropDownListBox and CMFCRibbonComboBox. CMFCDropDownListBox inherits from CMFCPopupMenu. I've tried to add PreTranslateMessage to my derived DropDownListBox class, but LBUTTONUP/DOWN messages never happens. Any tip on how to do this? A CMFCRibbonComboBox with check boxes..

    I 1 Reply Last reply
    0
    • Z z33z

      How do you stop a popup menu from closing when clicking with mouse button? What I want to do is to create a CMFCDropDownListBox with check boxes (to create a drop list with check boxes). I've created a derived class of CMFCDropDownListBox and CMFCRibbonComboBox. CMFCDropDownListBox inherits from CMFCPopupMenu. I've tried to add PreTranslateMessage to my derived DropDownListBox class, but LBUTTONUP/DOWN messages never happens. Any tip on how to do this? A CMFCRibbonComboBox with check boxes..

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      I'm not sure exactly what you're after, but if you look at article: Generic Picker Dropdown Control[^], I imitate a combobox. You could override the OnKillFocus handler (or remove it), and you'd get a menu-a-like window that doesn't get dismissed. Or you could go straight with my base CGenericPicker class, and derived your own special drop down. Good luck, Iain.

      I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]

      Z 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        I'm not sure exactly what you're after, but if you look at article: Generic Picker Dropdown Control[^], I imitate a combobox. You could override the OnKillFocus handler (or remove it), and you'd get a menu-a-like window that doesn't get dismissed. Or you could go straight with my base CGenericPicker class, and derived your own special drop down. Good luck, Iain.

        I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]

        Z Offline
        Z Offline
        z33z
        wrote on last edited by
        #3

        What I'm after it to stop CMFCPopupMenu from getting left button click messages, and handle those messages myself. :)

        Z 1 Reply Last reply
        0
        • Z z33z

          What I'm after it to stop CMFCPopupMenu from getting left button click messages, and handle those messages myself. :)

          Z Offline
          Z Offline
          z33z
          wrote on last edited by
          #4

          I found out how to do it: Inherit CMFCPopupMenuBar and handle the button clicks there. In my inherited CMFCDropDownListBox I override GetMenuBar and returns an instance of my inherited CMFCPopupMenuBar class.

          I 1 Reply Last reply
          0
          • Z z33z

            I found out how to do it: Inherit CMFCPopupMenuBar and handle the button clicks there. In my inherited CMFCDropDownListBox I override GetMenuBar and returns an instance of my inherited CMFCPopupMenuBar class.

            I Offline
            I Offline
            Iain Clarke Warrior Programmer
            wrote on last edited by
            #5

            Glad you've solved your own problem - always the best learning experience that way! Iain.

            I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]

            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