Toolbar Drop-down Button Width [modified]
-
Dramas, I've subclassed CToolBar to custom draw toolbars & I've worked around most of the quirks but I'm somewhat stuck when it comes to drawing the down arrow on a button with the BTNS_WHOLEDROPDOWN style or BTNS_DROPDOWN with TBSTYLE_EX_DRAWDDARROWS on the toolbar. From a bit of experimenting in XP I've found: BTNS_WHOLEDROPDOWN with TBSTYLE_AUTOSIZE on increases a button's width by 6 BTNS_WHOLEDROPDOWN with TBSTYLE_AUTOSIZE off increases a button's width by 7 BTNS_DROPDOWN with TBSTYLE_AUTOSIZE on increases a button's width by 19 BTNS_DROPDOWN with TBSTYLE_AUTOSIZE off increases a button's width by 18 (I'm assuming some of the 18/19 is padding but how much?). After playing with CToolBar::SetMetrics, I can confidently say that the toolbar & button padding settings do not affect the drop-down width but I can't find any documentation on how to query the O/S for the drop down width, or whether any system settings (e.g. themes) or other O/S versions will give different values. Is there something I've missed? Or can anyone confirm whether the drop down widths listed above are always true? -- modified at 10:02 Friday 10th August, 2007
T-Mac-Oz