avatar  


Recently viewed tickets

Log out

I want to create my own visual theme based on one of the existing visual managers. How can I do this?

Generally, there is no common way to customize the Visual Theme; we suggest looking over the Visual Manager source code and our examples. To create your own visual theme:
  1. Create your class derived from any existing visual manager classes (e.g., CBCGPVisualManager2022). Don’t forget to add DECLARE_DYNCREATE / IMPLEMENT_DYNCREATE!

  2. Override any required drawing methods (in CBCGPVisualManagerVS2012 or later managers, you can override the SetupColors method and specify your own color set). Overriding ModifyGlobalColors methods allows customizing all “global” colors, such as bar background/foreground colors.

  3. In your application class constructor, associate your class with the existing theme:

    Existing code:
    AddVisualTheme(theme, id, bActive);

    New code:
    AddVisualTheme(theme, id, bActive, RUNTIME_CLASS(CMyVisualManager));

    or

    Existing code:
    SetVisualTheme(theme);

    New code:
    SetVisualTheme(theme, RUNTIME_CLASS(CMyVisualManager));

Please review our BCGPEdgeDemo example: The CVisualManager class demonstrates how to customize the Office 2021 White appearance by changing specific colors. There are other demos available with custom visual themes:
  • BCGPMSMoneyDemo
  • BCGPMediaPlayer
  • BCGPShopDemo
Disclaimer: We don't provide any assistance in creating custom visual managers, and we're not responsible for the result (how the custom theme looks).
Creation date: 5/30/2019 8:49 PM (support)      Updated: 12/4/2024 9:39 PM (support)