IVsColorableItem.GetDefaultColors Method

Defines the default background and foreground colors for a custom colorable item.

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

Syntax

'宣言
Function GetDefaultColors ( _
    <OutAttribute> piForeground As COLORINDEX(), _
    <OutAttribute> piBackground As COLORINDEX() _
) As Integer
'使用
Dim instance As IVsColorableItem
Dim piForeground As COLORINDEX()
Dim piBackground As COLORINDEX()
Dim returnValue As Integer

returnValue = instance.GetDefaultColors(piForeground, _
    piBackground)
int GetDefaultColors(
    COLORINDEX[] piForeground,
    COLORINDEX[] piBackground
)
int GetDefaultColors(
    [OutAttribute] array<COLORINDEX>^ piForeground, 
    [OutAttribute] array<COLORINDEX>^ piBackground
)
function GetDefaultColors(
    piForeground : COLORINDEX[], 
    piBackground : COLORINDEX[]
) : int

Parameters

  • piForeground
    Type: []

    [out] Returns an integer containing the foreground color. For more information, see COLORINDEX

  • piBackground
    Type: []

    [out] Returns an integer containing the background color. For more information, see COLORINDEX

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 textmgr.idl:

HRESULT IVsColorableItem::GetDefaultColors(
   [out] COLORINDEX *piForeground,
   [out] COLORINDEX *piBackground
);

The color values returned are taken from the COLORINDEX enumeration and are essentially indices into a predefined color list.

Permissions

See Also

Reference

IVsColorableItem Interface

IVsColorableItem Members

Microsoft.VisualStudio.TextManager.Interop Namespace