tags:

views:

141

answers:

0

I have a CToolbar and within it I have a button with style BTNS_BUTTON|BTNS_DROPDOWN. I would like to make it a split button, so the left side of the button is a button, and the right side has a drop down menu.

To complete this, I create the button then I call ::SendMessage like so:

::SendMessage( hwndForButton, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS );

This works great and creates the split button, but also has the ill-effect of moving down the toolbar a couple pixels. If I don't send the message, then I still have the issue (and I don't have the split button anymore).

If I change the style of the button to BTNS_BUTTON|BTNS_WHOLEDROPDOWN then I don't have an issue, although I also don't have the split button.

Any clue as to what could be going wrong here? I figure there is a margin that is applied to a BNTS_DROPDOWN and it is causing the toolbar to move down.