CGXProperties::SetColor
void SetColor(int nIndex, COLORREF rgbColor);
nIndex
Unique index for the color-property (returned from AddColorProperty). For default color-properties you can use one of the following constants:
-
GX_COLOR_GRIDLINES: grid lines.
-
GX_COLOR_FIXEDLINES: separator line between frozen columns/rows and nonfrozen columns/rows.
-
GX_COLOR_TRACKINGLINE: outline the line for the row/column being sized.
-
GX_COLOR_DRAGGINGLINE: outline the line for the destination row/column being dragged.
- GX_COLOR_BACKGROUND: background color for the bottom and for the right of the grid area.
rgbColor
An RGB value which specifies the new color.
Remarks
Changes the color for a specific color-property.
When you have registered additional colors with AddColorProperty, you should pass the index returned by AddColorProperty to SetColor.
Example for calling SetColor with standard color properties:
GetParam()->GetProperties()
->SetColor(GX_COLOR_GRIDLINES, RGB(0,128,0));
GetParam()->GetProperties()->SetColor(GX_COLOR_BACKGROUND, RGB(255,255,255));
You can also supply a system color that will automatically change when
the user changes the desktop appearance with GXSYSCOLOR
GetParam()->GetProperties()->SetColor(GX_COLOR_BACKGROUND, GXSYSCOLOR(COLOR_WINDOW));
See Also
CGXProperties::GetColor CGXProperties::AddColorProperty