Поделиться через


COleControl::TranslateColor

Converts a color value from the OLE_COLOR data type to the COLORREF data type.

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

Параметры

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

  • hpal
    A handle to an optional palette; can be NULL.

Возвращаемое значение

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

Заметки

This function is useful to translate the stock ForeColor and BackColor properties to COLORREF types used by CDC member functions.

Требования

Header: afxctl.h

См. также

Основные понятия

COleControl Class

COleControl Members

Hierarchy Chart

COleControl::GetForeColor

COleControl::GetBackColor