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
'Déclaration
Function OnItemChanged ( _
ByRef rguidCategory As Guid, _
szItem As String, _
iItem As Integer, _
pInfo As ColorableItemInfo(), _
crLiteralForeground As UInteger, _
crLiteralBackground As UInteger _
) As Integer
'Utilisation
Dim instance As IVsFontAndColorEvents
Dim rguidCategory As Guid
Dim szItem As String
Dim iItem As Integer
Dim pInfo As ColorableItemInfo()
Dim crLiteralForeground As UInteger
Dim crLiteralBackground As UInteger
Dim returnValue As Integer
returnValue = instance.OnItemChanged(rguidCategory, _
szItem, iItem, pInfo, crLiteralForeground, _
crLiteralBackground)
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.
- 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.