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 General Discussion » Default Office 2003 colors Collapse All
Subject Author Date
Juri Tsjornoi Jan 10, 2005 - 7:52 AM

Could you tell me please, what colors should I use to get the default Office 2003 theme (I mean background color and selection color)?


Big thanks in advance! 

Technical Support Jan 10, 2005 - 9:51 AM

It’s not exactly clear what you mean, but if you want your application to have the very same look on different Windows OSes as when the Office 2003 theme produced on Windows XP, please use the following version of the paint manager:

// *.h
class CColorizedThemeOffice2003 :
   public CExtPaintManagerOffice2003
{
public:
    DECLARE_DYNCREATE( CColorizedThemeOffice2003 )
 
protected:
    virtual bool OnQueryThemeColors(
        COLORREF *pclrFillHint,
        COLORREF *pclrAccentHint = NULL
        )
    {
        // luna blue colors
        if( pclrFillHint != NULL )
            *pclrFillHint = RGB(151, 190, 244);
        if( pclrAccentHint != NULL )
            *pclrAccentHint = RGB(255, 200, 91);
 
        /*
 
        // luna olive colors
        if( pclrFillHint != NULL )
            *pclrFillHint = RGB(207, 215, 180);
        if( pclrAccentHint != NULL )
            *pclrAccentHint = RGB(242, 195, 115);
 
        // luna silver colors
        if( pclrFillHint != NULL )
            *pclrFillHint = RGB(188, 189, 207);
        if( pclrAccentHint != NULL )
            *pclrAccentHint = RGB(255, 200, 91);
 
        */
 
        return true;
    }
 
    virtual bool OnQueryUseThemeColors() const
    {
        return true;
    }
};
 
// *.cpp
IMPLEMENT_DYNCREATE( CColorizedThemeOffice2003,
    CExtPaintManagerOffice2003 )

Riki Risnandar Apr 1, 2005 - 8:24 AM

using these code change the background color but the color of CExtMenuControlBar is not changing. please tell me how to theme these menu.

 

thanks,

Riki Risnandar

Technical Support Apr 1, 2005 - 9:06 AM

The version of the CColorizedThemeOffice2003 class dated Jan 10, 2005 worked well, but latter we made some changes in the Paint Manager, so you should additionally override the OnQuerySystemTheme() virtual method and return the ThemeUnknown value:

virtual e_system_theme_t OnQuerySystemTheme() const
{
            return ThemeUnknown;
}