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.
Subject |
Author |
Date |
|
Chris Anderson
|
May 9, 2007 - 10:15 AM
|
I have frame/form inherited from CExtNCW. All theme changes are taking palce correctly. Now I need to get the background color of the frame/form. Earlier we were using GetSysColor(COLOR_WINDOW). Now I have modified to g_PaintManager->GetColor(COLOR_WINDOW). With this change I am not getting the actual background color of the form painted using the g_PaintManager. Do I have to use COLOR_BTNFACE? Please provide me all the mapping of colors that needs to be used when Prof-UI paint manager has been installed.
Thanks
|
|
Chris Anderson
|
May 10, 2007 - 10:10 AM
|
Thanks. This is usefull information.
|
|
Technical Support
|
May 10, 2007 - 8:24 AM
|
The 2000/XP paint managers are based on the color indices defined in the CExtPaintManager::e_translated_colors_t enumeration. The 2003/2005 paint managers are based both on the same color indices but their specific indices are defined in the CExtPaintManagerOffice2003::e_2003_colors_t enumeration. You can see how all the color constants are initialized in the CExtPaintManager::InitTranslatedColors() method and it is overridden in other paint managers. The most of 2003/2005 color values are computed depending on two color values called an accent color and a background color in the Windows XP user interface theme API and the ThemeColorizer sample just substitutes these two root color values. The Office 2007 themes in fact is a colorized version of the Office 2003 theme plus a set of bitmap based painting algorithms for such UI items as push/check/radio buttons, combo boxes and non client window areas.
You can always get paint manager colors using the g_PaintManager->GetColor() method rather than ::GetSysColor() , but please note some UI parts are painted using a gradient. As for the background gradient colors, they are defined in InitTranslatedColors() as _2003CLR_GRADIENT_DARK and _2003CLR_GRADIENT_LIGHT constants.
|
|