GetDCBrushColor

[This is preliminary documentation and subject to change.]

The GetDCBrushColor function identifies the device context (DC) whose brush color is to be returned.

GetDCBrushColor(
  HDC hdc
);
 

Parameters

hdc
Handle to the device context whose brush color is to be returned.

Return Values

If the function succeeds, the return value is a color reference for the current DC brush color.

If the function fails, the return value is CLR_INVALID.

Remarks

The GetDCBrushColor function returns the previous DC_BRUSH color even if the stock object DC_BRUSH is not selected in the device context. For information on setting the device context brush color, see SetDCBrushColor.

ICM: Color management is performed if ICM is enabled.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Included as a resource in msimg32.dll.

See Also

Device Contexts Overview, Device Context Functions, SetDCBrushColor, About Device Contexts