Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtBarSpinButton - size Collapse All
Subject Author Date
Alastair Watts Oct 5, 2011 - 9:24 AM

How do I modify the height of this please?

Alastair Watts Oct 6, 2011 - 4:10 AM

Thanks


 

Technical Support Oct 5, 2011 - 11:01 AM

You should override the CExtBarButton::CalculateLayout() virtual method for providing a toolbar button with an alternative size. You can override the CExtBarButton::PaintCompound() virtual method if you need a completely repainted toolbar button. Your method can be very similar to original with only one different line of code:

pBar->PmBridge_GetPM()->PaintPushButton( dc, _ppbd );

The line of code above invokes the default paint manager. You can instantiate another copy of any paint manager and invoke it instead of default one here.

Alastair Watts Oct 5, 2011 - 9:38 AM

Don’t worry, I did it by overriding CMyToolControlBar::_RecalcPositionsImpl()


Another question though ... Each bar button is drawn according to the toolbars paint manager, is it possible to draw CExtSpinBarButton using a different theme as the toolbar’s theme is CExtPaintManagerOffice2007_R1 which draws the spin buttons the same regardless of hover, etc and I want the button the change colour when hovered.