Objective Toolkit : Chapter 5 Look and Feel Styles : Microsoft Office 2003 Style
Microsoft Office 2003 Style
The Office 2003 style feature allows your applications to take on a similar look and feel to the Microsoft Office 2003 suite of products. This visual style is theme-enabled, meaning that colors will change depending on the current Windows XP theme you have enabled. (Windows XP required.)
The following are examples of the styles of Microsoft Office 2003 components that Objective Toolkit offers:
Figure 49 – Gradient-shaded and rounded toolbars with grippers
Figure 50 – Hot toolbar buttons
Figure 51 – Hot pressed toolbar buttons
Figure 52 – Large toolbars
Figure 53 – Vertically docked toolbars
Figure 54 – Menus with grippers and hot menu buttons
Figure 55 – Gradient-shaded menus with hot items
Figure 56 – Checks with hot and hot pressed states
Figure 57 – Expanded menus
Figure 58 – Gradient-shaded control bar with grippers
Figure 59 – Control bars with embedded controls
Figure 60 – Themed shortcut bars
Figure 61 – Gradient-shaded workbook/worksheet window tabs
Figure 62 – Gradient-shaded 3D tab controls
Figure 63 – Triple-nested tabs on bottom
Figure 64 – Tabs on left with double-nested tabs on bottom
Figure 65 – Tabs on top with double-nested tabs on bottom
Figure 66 – Tabs on right with double-nested tabs on bottom
Figure 67 – Themed status bars
Figure 68 – Objective Toolkit’s Viz sample
Enabling Office 2003 Styles
To enable Microsoft Office 2003 styles, add RWSetOfc2003Style (TRUE); in your main application class’s InitInstance(). You must also include toolkit\ot_toolbar.h in your application’s stdafx.h file to pick up the classes involved with this look-and-feel style. Theme colors will automatically update when you change the system theme via the OnSysColorsChange() call. Do not use this look-and-feel style in conjunction with the .NET/XP style, described in “Visual Studio .NET/Office XP Style.” You can either remove any previous RWSetDotNetStyle() or set it to FALSE.
For toolbars and menus to use this style, you must create Stingray toolbars and menus. Controls that you create should have their corresponding flat style and grippers enabled. Cool Look should also be enabled.
For classes derived from SECControlBar, if you have overridden OnEraseBkgnd(), you must return SECControlBar::OnEraseBkgnd(pDC); at the end of your routine in order to have the background draw themed.