IVsFontAndColorUtilities.GetEncodedSysColor Method
Obtain a System Color service index corresponding to a supplied COLORREF.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
‘선언
Function GetEncodedSysColor ( _
crSource As UInteger, _
<OutAttribute> ByRef piSysColor As Integer _
) As Integer
‘사용 방법
Dim instance As IVsFontAndColorUtilities
Dim crSource As UInteger
Dim piSysColor As Integer
Dim returnValue As Integer
returnValue = instance.GetEncodedSysColor(crSource, _
piSysColor)
int GetEncodedSysColor(
uint crSource,
out int piSysColor
)
int GetEncodedSysColor(
[InAttribute] unsigned int crSource,
[OutAttribute] int% piSysColor
)
abstract GetEncodedSysColor :
crSource:uint32 *
piSysColor:int byref -> int
function GetEncodedSysColor(
crSource : uint,
piSysColor : int
) : int
Parameters
- crSource
Type: System.UInt32
[in] A COLORREF representation of color value.
- piSysColor
Type: System.Int32%
[out] The System Color Service index corresponding the crSource.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
The COLORREF crSource used as input must a type of CT_SYSCOLOR as returned by GetColorType.
The value of piSysColor is the same as would be used as an argument to GetSysColor to obtain a COLORREF with the value of crSource.
If an error occurs, the value of piSysColor is undefined.
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsFontAndColorUtilities Interface
IVsFontAndColorUtilities Members
Microsoft.VisualStudio.Shell.Interop Namespace