IVsFontAndColorUtilities.GetColorType(UInt32, Int32) Method
Definition
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.
Obtain the type of color representation in a COLORREF.
public:
int GetColorType(System::UInt32 crSource, [Runtime::InteropServices::Out] int % pctType);
int GetColorType(unsigned int crSource, [Runtime::InteropServices::Out] int & pctType);
public int GetColorType (uint crSource, out int pctType);
abstract member GetColorType : uint32 * int -> int
Public Function GetColorType (crSource As UInteger, ByRef pctType As Integer) As Integer
Parameters
- crSource
- UInt32
[in] A COLORREF representation of color value.
- pctType
- Int32
[out] An integer representing the color type of crSource
.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
The value of pctType
will be a member of the __VSCOLORTYPE enumeration.
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
.