IVsFontAndColorEvents::OnItemChanged Method (Guid, String^, Int32, array<ColorableItemInfo>^, UInt32, UInt32)

 

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)

int OnItemChanged(
	[InAttribute] Guid% rguidCategory,
	String^ szItem,
	int iItem,
	array<ColorableItemInfo>^ pInfo,
	unsigned int crLiteralForeground,
	unsigned int crLiteralBackground
)

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.

iItem
Type: System::Int32

[in] Index of item modified.

pInfo
Type: array<Microsoft.VisualStudio.Shell.Interop::ColorableItemInfo>^

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

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.

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.

Return to top
Show: