CBrush::CreateSysColorBrush
This member function initializes a brush color.
Syntax
BOOL CreateSysColorBrush ( int nIndex );
At a Glance
Remarks
This function behaves the same way in MFC for Windows CE as it does in the standard MFC implementation, except that you must use one of the color index flags from the following list for the nIndex parameter. You can not use an integer value because these flags have different values in MFC for Windows CE than in the standard MFC implementation.
The color index value corresponds to the color used to paint one of the following 21 window elements:
-
COLOR_3DDKSHADOW
-
Dark shadow for three-dimensional display elements.
-
COLOR_3DFACE
-
Face color for three-dimensional display elements.
-
COLOR_3DHIGHLIGHT
-
Highlight color for three-dimensional display elements (for edges facing the light source.)
-
COLOR_3DLIGHT
-
Light color for three-dimensional display elements (for edges facing the light source.)
-
COLOR_3DSHADOW
-
Shadow color for three-dimensional display elements (for edges facing away from the light source).
-
COLOR_ACTIVEBORDER
-
Active window border.
-
COLOR_ACTIVECAPTION
-
Active window caption.
-
COLOR_BACKGROUND
-
Desktop.
-
COLOR_BTNFACE
-
Face shading on push buttons.
-
COLOR_BTNHIGHLIGHT
-
Highlight color for buttons (same as COLOR_3DHILIGHT).
-
COLOR_BTNSHADOW
-
Edge shading on push buttons.
-
COLOR_BTNTEXT
-
Text on push buttons.
-
COLOR_CAPTIONTEXT
-
Text in caption, size box, and scroll bar arrow box.
-
COLOR_DESKTOP
-
Same as COLOR_BACKGROUND.
-
COLOR_GRAYTEXT
-
Grayed (disabled) text. This color is set to zero if the current display driver does not support a solid gray color.
-
COLOR_HIGHLIGHT
-
Item(s) selected in a control.
-
COLOR_HIGHLIGHTTEXT
-
Text of item(s) selected in a control.
-
COLOR_INACTIVEBORDER
-
Inactive window border.
-
COLOR_INACTIVECAPTION
-
Inactive window caption.
-
COLOR_INACTIVECAPTIONTEXT
-
Color of text in an inactive caption.
-
COLOR_INFOBK
-
Background color for tooltip controls.
-
COLOR_INFOTEXT
-
Text color for tooltip controls.
-
COLOR_MENU
-
Menu background.
-
COLOR_MENUTEXT
-
Text in menus.
-
COLOR_SCROLLBAR
-
Scroll bar gray area.
-
COLOR_WINDOW
-
Window background.
-
COLOR_WINDOWFRAME
-
Window frame.
-
COLOR_WINDOWTEXT
-
Text in windows.
See Also
CBrush Overview, CBrush Member Functions, Graphical Drawing Object Classes, CBrush::CreateBrushIndirect, CBrush::CreateDIBPatternBrush, CBrush::CreateSolidBrush, CGdiObject::DeleteObject