Freigeben über


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

'Declaration
Function GetTrackedItemIndex ( _
    crSource As UInteger, _
    <OutAttribute> ByRef pAspect As Integer, _
    <OutAttribute> ByRef piItem As Integer _
) As Integer
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

  • crSource
    Type: UInt32

    [in] A COLORREF representation of color value.

  • pAspect
    Type: Int32%

    [out] A valid member of the __VSCOLORASPECT indicating if the value of crSource is a foreground or background color.

  • piItem
    Type: Int32%

    The index of the item being tracked.

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace

Other Resources

Fonts