BCGControlBar Library framework allows you to create various application
"skins" and easily change the look and feel of user-interface elements.
On the picture below you can see a screenshot taken from the "BCGSkins"
The framework maintains a global object of CBCGVisualManager
class, that by default draws the following GUI elements:
- bar borders (OnDrawBarBorder)
- bar grippers (OnDrawBarGripper)
- button borders (OnDrawButtonBorder)
- caption buttons (OnDrawCaptionButton)
- menu borders (OnDrawMenuBorder)
- separators (OnDrawSeparator)
- fills bar background (OnFillBarBackground)
- fills button interior (OnFillButtonInterior)
- highlights menu items (OnHighlightMenuItem)
Each element is displayed by separate virtual function.
To implement your own skin you should perform the following steps:
- Derive your own class from the CBCGVisualManager
- For each GUI element whose appearance you want to customize override the
relevant drawing function.
- CBCGVisualManager object is a singleton. When you want to
instantiate a visual manager object, you should delete the previous
instance. Use the CBCGVisualManager::GetInstance
static function to get access to the current instance.
The following example shows how to switch between default and custom visual
CBCGSkinsApp::SetSkin (int iIndex)
(CBCGVisualManager::GetInstance () != NULL)
Back to the Developer Area