IVsFontAndColorUtilities.GetTrackedItemIndex Method

Obtain the index of a tracked color as represented by a COLORREF and a member of the __VSCOLORASPECT indicated if the color was used in the foreground or background.

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

Syntax

‘선언
Function GetTrackedItemIndex ( _
    crSource As UInteger, _
    <OutAttribute> ByRef pAspect As Integer, _
    <OutAttribute> ByRef piItem As Integer _
) As Integer
‘사용 방법
Dim instance As IVsFontAndColorUtilities
Dim crSource As UInteger
Dim pAspect As Integer
Dim piItem As Integer
Dim returnValue As Integer

returnValue = instance.GetTrackedItemIndex(crSource, _
    pAspect, piItem)
int GetTrackedItemIndex(
    uint crSource,
    out int pAspect,
    out int piItem
)
int GetTrackedItemIndex(
    [InAttribute] unsigned int crSource, 
    [OutAttribute] int% pAspect, 
    [OutAttribute] int% piItem
)
abstract GetTrackedItemIndex : 
        crSource:uint32 * 
        pAspect:int byref * 
        piItem:int byref -> int 
function GetTrackedItemIndex(
    crSource : uint, 
    pAspect : int, 
    piItem : int
) : int

Parameters

  • pAspect
    Type: System.Int32%
    [out] A valid member of the __VSCOLORASPECT indicating if the value of crSource is a foreground or background color.
  • piItem
    Type: System.Int32%
    The index of the item being tracked.

Return Value

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

Remarks

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