IVsFontAndColorUtilities.EncodeIndexedColor(COLORINDEX, UInt32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Translates a member of the COLORINDEX enumeration into its RGB (COLORREF) color value equivalent.
public:
int EncodeIndexedColor(Microsoft::VisualStudio::TextManager::Interop::COLORINDEX idx, [Runtime::InteropServices::Out] System::UInt32 % pcrResult);
int EncodeIndexedColor(Microsoft::VisualStudio::TextManager::Interop::COLORINDEX idx, [Runtime::InteropServices::Out] unsigned int & pcrResult);
public int EncodeIndexedColor (Microsoft.VisualStudio.TextManager.Interop.COLORINDEX idx, out uint pcrResult);
abstract member EncodeIndexedColor : Microsoft.VisualStudio.TextManager.Interop.COLORINDEX * uint32 -> int
Public Function EncodeIndexedColor (idx As COLORINDEX, ByRef pcrResult As UInteger) As Integer
- idx
- COLORINDEX
[in] A valid member of the COLORINDEX enumeration
- pcrResult
- UInt32
[out] A COLORREF equivalent to the COLORINDEX supplied.
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
The value returned in pcrResult
is a COLORREF representation of the current color value of the component indicated by the COLORINDEX enumeration used as the argument idx
.
The COLORREF value will have a type of CT_COLORINDEX as returned by GetColorType.
Managed code can obtain functionality equivalent to GetSysColor with SystemColors and convert between COLORREF and the System.Drawing.Color
structure using M:System.Drawing.ColorTranslator.FromWin32
and M:System.Drawing.ColorTranslator.ToWin32
.