共用方式為


IVsFontAndColorStorage.GetItem Method

Returns the user-modifiable information for a named Display Item in the currently open Category.

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

Syntax

'Declaration
Function GetItem ( _
    szName As String, _
    <OutAttribute> pInfo As ColorableItemInfo() _
) As Integer
int GetItem(
    string szName,
    ColorableItemInfo[] pInfo
)
int GetItem(
    [InAttribute] String^ szName, 
    [InAttribute] [OutAttribute] array<ColorableItemInfo>^ pInfo
)
abstract GetItem : 
        szName:string * 
        pInfo:ColorableItemInfo[] byref -> int
function GetItem(
    szName : String, 
    pInfo : ColorableItemInfo[]
) : int

Parameters

  • szName
    Type: String

    [in] Null-terminated string containing the non-localized name of the Display Item in the currently open Category.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFontAndColorStorage::GetItem(
   [in] LPCOLESTR szName,
   [in, out] ColorableItemInfo *pInfo
);

The information returned by this method provides a snap shot of the current state of stored fonts and colors.

It is the responsibility of the applications rendering text to the Visual Studio environment to update their display to match the settings returned by this method.

.NET Framework Security

See Also

Reference

IVsFontAndColorStorage Interface

Microsoft.VisualStudio.Shell.Interop Namespace

IVsFontAndColorStorage2