IVsFontAndColorUtilities.GetTrackedItemIndex(UInt32, Int32, Int32) Method

Definition

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.

public:
 int GetTrackedItemIndex(System::UInt32 crSource, [Runtime::InteropServices::Out] int % pAspect, [Runtime::InteropServices::Out] int % piItem);
int GetTrackedItemIndex(unsigned int crSource, [Runtime::InteropServices::Out] int & pAspect, [Runtime::InteropServices::Out] int & piItem);
public int GetTrackedItemIndex (uint crSource, out int pAspect, out int piItem);
abstract member GetTrackedItemIndex : uint32 * int * int -> int
Public Function GetTrackedItemIndex (crSource As UInteger, ByRef pAspect As Integer, ByRef piItem As Integer) As Integer

Parameters

crSource
UInt32

[in] A COLORREF representation of color value.

pAspect
Int32

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

piItem
Int32

The index of the item being tracked.

Returns

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.

Applies to