Compartilhar via


IVsFontAndColorEvents.OnItemChanged Method

Definition

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

public:
 int OnItemChanged(Guid % rguidCategory, System::String ^ szItem, int iItem, cli::array <Microsoft::VisualStudio::Shell::Interop::ColorableItemInfo> ^ pInfo, System::UInt32 crLiteralForeground, System::UInt32 crLiteralBackground);
public int OnItemChanged (ref Guid rguidCategory, string szItem, int iItem, Microsoft.VisualStudio.Shell.Interop.ColorableItemInfo[] pInfo, uint crLiteralForeground, uint crLiteralBackground);
abstract member OnItemChanged : Guid * string * int * Microsoft.VisualStudio.Shell.Interop.ColorableItemInfo[] * uint32 * uint32 -> int
Public Function OnItemChanged (ByRef rguidCategory As Guid, szItem As String, iItem As Integer, pInfo As ColorableItemInfo(), crLiteralForeground As UInteger, crLiteralBackground As UInteger) As Integer

Parameters

rguidCategory
Guid

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

szItem
String

[in] Canonical name of item modified.

iItem
Int32

[in] Index of item modified.

pInfo
ColorableItemInfo[]

[in] A ColorableItemInfo structure containing information about the altered item.

crLiteralForeground
UInt32

[in] The Display Item's foreground color.

crLiteralBackground
UInt32

[in] The Display Item's background color.

Returns

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.

Applies to