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 » Raised buttons on ribbon bar Collapse All
Subject Author Date
Robert Webb Mar 2, 2009 - 11:20 PM

How can I use a raised-style button on a ribbon bar?  Typically they are flat, and all you see against the background is the button’s icon and text.  How can I make a button actually look like a button, like those in the ProfUIS Controls demo?  I’m (mostly) using Office 2007 themes.


Thanks,


Rob.

Technical Support Mar 3, 2009 - 12:05 PM

You can create and use your own CExtRibbonNode-derived class which has same constructors and the CExtRibbonNode::_OnRibbonGetButtonRTC() virtual method which returns runtime class of your CExtBarButton-derived class. Your CExtBarButton-derived class should implement the CExtBarButton::PaintCompound() virtual method where you should paint button like you want to see it. As result, your custom painted buttons will appear in the ribbon bar. In the simplest case, you can copy the source code from the CExtBarButton::PaintCompound() method and replace only the pBar->PmBridge_GetPM()->PaintPushButton( dc, _ppbd ); line of code with the pAnotherPM->PaintPushButton( dc, _ppbd ); line of code where the pAnotherPM is the pointer to global instance of paint manager which you want to draw the ribbon button. This means entire ribbon bar will be used by the g_PaintManager global paint manager instance stored inside Prof-UIS and your ribbon buttons will be painted by the second pAnotherPM global instance of another paint manager stored somewhere in your application.