IVsFontAndColorStorage::SetItem Method (String^, array<ColorableItemInfo>^)
Stores the user-modifiable color and font settings for a named Display Item in the registry.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- szName
-
Type:
System::String^
[in] Null-terminated string containing the non-localized name of the Display Item.
- pInfo
-
Type:
array<Microsoft.VisualStudio.Shell.Interop::ColorableItemInfo>^
[in] Reference to a ColorableItemInfo structure containing information about the Display Item.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsFontAndColorStorage::SetItem( [in] LPCOLESTR szName, [in] ColorableItemInfo *pInfo );
If a call to IVSFontAndColorStorage::SetItem succeeds, and the item's Category was opened by OpenCategory with a mode of FCSF_PROPAGATECHANGES, the method generates an event to be handled by OnItemChanged. If the item's Category was not opened with FCSF_PROPAGATECHANGES, applications must query the environment to obtain this information using GetItem GetItemByName or GetItem.
It is up to applications rendering text to the Visual Studio environment to update their display to match the settings modified by this method.