Share via


IVsFontAndColorEvents.OnItemChanged Method

Called by the environment whenever an item in the Display Items drop-down list is modified.

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

Syntax

'Declaration
Function OnItemChanged ( _
    ByRef rguidCategory As Guid, _
    szItem As String, _
    iItem As Integer, _
    pInfo As ColorableItemInfo(), _
    crLiteralForeground As UInteger, _
    crLiteralBackground As UInteger _
) As Integer
int OnItemChanged(
    ref Guid rguidCategory,
    string szItem,
    int iItem,
    ColorableItemInfo[] pInfo,
    uint crLiteralForeground,
    uint crLiteralBackground
)
int OnItemChanged(
    [InAttribute] Guid% rguidCategory, 
    [InAttribute] String^ szItem, 
    [InAttribute] int iItem, 
    [InAttribute] array<ColorableItemInfo>^ pInfo, 
    [InAttribute] unsigned int crLiteralForeground, 
    [InAttribute] unsigned int crLiteralBackground
)
abstract OnItemChanged : 
        rguidCategory:Guid byref * 
        szItem:string * 
        iItem:int * 
        pInfo:ColorableItemInfo[] * 
        crLiteralForeground:uint32 * 
        crLiteralBackground:uint32 -> int
function OnItemChanged(
    rguidCategory : Guid, 
    szItem : String, 
    iItem : int, 
    pInfo : ColorableItemInfo[], 
    crLiteralForeground : uint, 
    crLiteralBackground : uint
) : int

Parameters

  • rguidCategory
    Type: System.Guid%

    [in] The GUID of a category with a modified Display Item.

  • szItem
    Type: System.String

    [in] Canonical name of item modified.

  • crLiteralForeground
    Type: System.UInt32

    [in] The Display Item's foreground color.

  • crLiteralBackground
    Type: System.UInt32

    [in] The Display Item's background color.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFontAndColorEvents::OnItemChanged(
   [in] REFGUID rguidCategory,
   [in] LPCOLESTR szItem,
   [in] LONG iItem,
   [in] const ColorableItemInfo *pInfo,
   [in] COLORREF crLiteralForeground,
   [in] COLORREF crLiteralBackground
);

When the bForegroundValid, bBackgroundValid, and bFontFlagsValid flags are set to true, the corresponding Display Items settings were modified.

If the Display Items setting was not modified, then the value in these arguments will be false, and the corresponding color data is invalid and should be ignored.

.NET Framework Security

See Also

Reference

IVsFontAndColorEvents Interface

Microsoft.VisualStudio.Shell.Interop Namespace