COleControl::TranslateColor

COLORREF TranslateColor( OLE_COLOR clrColor, HPALETTE hpal = NULL );

Return Value

An RGB (red, green, blue) 32-bit color value that defines the solid color closest to the clrColor value that the device can represent.

Parameters

clrColor

A OLE_COLOR data type. For more information, see the Windows OleTranslateColor function.

hpal

A handle to an optional palette; can be NULL.

Remarks

Call this function to convert a color value from the OLE_COLOR data type to the COLORREF data type. This function is useful to translate the stock ForeColor and BackColor properties to COLORREF types used by CDC member functions.

COleControl OverviewClass MembersHierarchy Chart

See Also   COleControl::GetForeColor, COleControl::GetBackColor