IVsFontAndColorUtilities.EncodeSysColor Method

Returns a RGB (COLORREF) color value corresponding to a specified system color component.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

‘선언
Function EncodeSysColor ( _
    iSysColor As Integer, _
    <OutAttribute> ByRef pcrResult As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsFontAndColorUtilities
Dim iSysColor As Integer
Dim pcrResult As UInteger
Dim returnValue As Integer

returnValue = instance.EncodeSysColor(iSysColor, _
    pcrResult)
int EncodeSysColor(
    int iSysColor,
    out uint pcrResult
)
int EncodeSysColor(
    [InAttribute] int iSysColor, 
    [OutAttribute] unsigned int% pcrResult
)
abstract EncodeSysColor : 
        iSysColor:int * 
        pcrResult:uint32 byref -> int 
function EncodeSysColor(
    iSysColor : int, 
    pcrResult : uint
) : int

Parameters

  • iSysColor
    Type: System.Int32
    [in] Valid system color component value.
  • pcrResult
    Type: System.UInt32%
    [out] An RGB (COLORREF) representation of the specified system component color.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

Valid system component must be valid inputs to GetSysColor. For a list of valid values, see System Colors.

The value of pcrResult returns the current color value of the component.

The COLORREF will have a type of CT_SYSCOLOR 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.

.NET Framework Security

See Also

Reference

IVsFontAndColorUtilities Interface

IVsFontAndColorUtilities Members

Microsoft.VisualStudio.Shell.Interop Namespace

Other Resources

Fonts