How to stop popup menu from closing?
-
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..
-
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'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/[^]
-
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/[^]
-
What I'm after it to stop CMFCPopupMenu from getting left button click messages, and handle those messages myself. :)
-
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.
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/[^]