Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Grid User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

13.7 Objective Grid and Windows XP Visual Styles

13.7.1 Grids

13.7.1.1 Database Grids

The record browser window will be drawn with visual styles under Windows XP. In addition, when "Attach Foreign Table" is used, the resultant tabbed combo boxes in the grid cells will have visual styles enabled. Any other controls used, such as the Date/Time Control, Currency control, etc., will also be themed under Windows XP.

13.7.1.2 Hierarchical Grids

The tree control in the hierarchical grids will be drawn according to the theme enabled. The cell that contains the grid cell will be treated as the tree item and drawn accordingly.

13.7.1.3 Tabbed Grids

Both the dynamic and static tab classes (CGXTabWnd and CGXDTabWnd) are drawn with header visual styles under Windows XP.

13.7.2 Controls

Objective Grid contains many controls specifically designed to be embedded in grid cells. These controls will have the Windows XP look and feel when they are run under Windows XP. Applications should link to comctrl32.dll (version 6) using a manifest file.

When Windows XP themes are enabled, the behavior of these controls differs under XP and 2000:

13.7.2.1 CGXCheckBox, CGXCheckBoxEx

The 2D and 3D versions of the CGXCheckBox looks pretty much the same on Windows XP. When drawn with Visual styles, it is not possible to replace the bitmaps with custom ones.

13.7.2.2 CGXCheckListComboBox

This control is drawn with visual styles for VC++ 7.1 or later. This control uses CCheckListBox from MFC as the base class.

13.7.2.3 CGXProgressCtrl

The foreground color and the background color of the progress bar can't be changed when visual styles are applied.

13.7.2.4 CGXRadioButton & CGXRadioButtonEx

The 2D and 3D versions look the same under visual styles in Windows XP.

13.7.2.5 CGXTabbedComboBoxWnd

The title bar is drawn with a visual styles-like header. In tabbed combo boxes with more than one display column, the active column is marked with the hot style.

13.7.3 Giving Objective Grid an Excel XP Look

13.7.3.1 Headers

When Excel-like headers are used in Windows XP with visual styles enabled, the headers behave like Excel XP. To get the exact look and feel of Excel XP, set solid grid lines by calling:

in the InitInstance() of the application.

If the GetParam()->SetExcelLikeHeaders() function is called from OninitialUpdate() with TRUE as the argument, the headers behave like Excel XP headers. If the visual styles are not enabled, then headers will behave like Excel 2000 headers.

13.7.3.2 Color of Selected Cells

Excel XP uses a different color (i.e. other than black) for filling blocked or selected cells. This can be done programmatically as well by overriding DrawInvertCell() and GetStyleRowCol().

13.7.3.3 Defining the Color of Cell Headers

You can define a custom color for the headers of selected cells. The coloring of cell headers is OFF by default. When the coloring of cell headers is turned ON, the default highlight color is orange (RGB 255, 180, 95).

Use the following functions to change the cell header to use colors other than the default, which are found in the CGXHeader class of gxctrli.h:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.