#197 Chevron operation for multi-line toolbars

v1.0 (example)
closed-fixed
5
2014-03-20
2008-01-30
Toby Leach
No

There is a problem with the functionality of the tool bar cheveron control when using multi-line tool bars, i.e. CToolBarCtrl classes that have the TBSTYLE_WRAPABLE style.
Our WTL application allows the user to add buttons to a tool bar that enables them to invoke user-authored macros. There is no limit to the number of buttons that they can make, but there is a limited number of buttons that can be displayed (say, 3 lines of buttons). If the user adds more buttons than can be displayed, the chevron gets displayed correctly but does nothing when the user clicks on it. That is to say that no drop-down menu appears containing the user's extra button commands.
F.Y.I. I found a fix for the problem in atlframe.h. Function WTL::CFrameWindowImplBase::PrepareChevronMenu() I replace the line...
if (rcButton.right > rcClient.right)
with...
if ((rcButton.right > rcClient.right) || (rcButton.bottom > rcClient.bottom))
...and all is well.
Just thought I'd share this as I guess a new VS'08-friendly release might be pending.

Regards,
Toby Leach.

Discussion


Anonymous


Cancel   Add attachments