Skip to content

Latest commit

 

History

History
191 lines (172 loc) · 3.48 KB

nf-olectl-oletranslatecolor.md

File metadata and controls

191 lines (172 loc) · 3.48 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:olectl.OleTranslateColor
OleTranslateColor function (olectl.h)
Converts an OLE_COLOR type to a COLORREF.
OleTranslateColor
OleTranslateColor function [COM]
_ctrl_OleTranslateColor
com.oletranslatecolor
olectl/OleTranslateColor
com\oletranslatecolor.htm
com
f4b407c3-e88a-47b4-bb43-8f691629d2f3
12/05/2018
OleTranslateColor, OleTranslateColor function [COM], _ctrl_OleTranslateColor, com.oletranslatecolor, olectl/OleTranslateColor
olectl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
OleAut32.lib
OleAut32.dll
Windows
19H1
OleTranslateColor
olectl/OleTranslateColor
c++
APIRef
kbSyntax
DllExport
OleAut32.dll
OleTranslateColor

OleTranslateColor function

-description

Converts an OLE_COLOR type to a COLORREF.

-parameters

-param clr [in]

The OLE color to be converted into a COLORREF.

-param hpal [in]

Palette used as a basis for the conversion.

-param lpcolorref [out]

Pointer to the caller's variable that receives the converted COLORREF result. This parameter can be NULL, indicating that the caller wants only to verify that a converted color exists.

-returns

This function supports the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following value.

Return code Description
S_OK
The color was translated successfully.

-remarks

The following table describes the color conversion.

OLE_COLOR hPal COLORREF
invalid Undefined (E_INVALIDARG)
0x800000xx, xx is not a valid GetSysColor index Undefined (E_INVALIDARG)
invalid Undefined (E_INVALIDARG)
0x0100iiii, iiii is not a valid palette index valid palette Undefined (E_INVALIDARG)
0x800000xx, xx is a valid GetSysColor index NULL 0x00bbggrr
0x0100iiii, iiii is a valid palette index NULL 0x0100iiii
0x02bbggrr (palette relative) NULL 0x02bbggrr
0x00bbggrr NULL 0x00bbggrr
0x800000xx, xx is a valid GetSysColor index valid palette 0x00bbggrr
0x0100iiii, iiii is a valid palette index in hPal valid palette 0x0100iiii
0x02bbggrr (palette relative) valid palette 0x02bbggrr
0x00bbggrr valid palette 0x02bbggrr