0

I have seen this excellent answer about how to use CMFCButtonMenu control.

I have also read the MSDN about the control.

Example:

Button Menu

Clicking the drop down works correctly. However, to quote the aforementioned SO Answer:

If left side of button is clicked, then event handler is called directly, without showing a popup menu.

How can I change this default behaviour? I want to always display the menu when they click anywhere on the button.

I should add that thus button is being displayed on a CDialog in a CDialog based application.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164

1 Answers1

1

I overlooked the Default Click property:

DefaultClick

Setting that to False provides the behaviour I need.

I saw this in the source for the class:

BOOL  m_bDefaultClick; // Allow default (on button text/image) processing

That made me go try the setting.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164