Share via


IVsPackageDefinedTextMarkerType.GetDefaultColors Method

Returns the default foreground and background colors for a marker.

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

Syntax

'Declaration
Function GetDefaultColors ( _
    <OutAttribute> piForeground As COLORINDEX(), _
    <OutAttribute> piBackground As COLORINDEX() _
) As Integer
int GetDefaultColors(
    COLORINDEX[] piForeground,
    COLORINDEX[] piBackground
)
int GetDefaultColors(
    [OutAttribute] array<COLORINDEX>^ piForeground, 
    [OutAttribute] array<COLORINDEX>^ piBackground
)
abstract GetDefaultColors : 
        piForeground:COLORINDEX[] byref * 
        piBackground:COLORINDEX[] byref -> int
function GetDefaultColors(
    piForeground : COLORINDEX[], 
    piBackground : COLORINDEX[]
) : int

Parameters

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 IVsPackageDefinedTextMarkerType::GetDefaultColors(
   [out] COLORINDEX *piForeground, 
   [out] COLORINDEX *piBackground
);

If you specify a value of MV_LINE or MV_BORDER for your marker type, then GetDefaultColors is not called by the environment. Otherwise, this method allows you to specify the default foreground and background coloring that you want to apply to the marked text, based on whether you specified a value of MV_COLOR_ALWAYS or MV_COLOR_LINE_IF_NO_MARGIN. This method only specifies the default color, which the user can change using the Options command on the Tools menu.

Note

The value returned is a COLORINDEX enumeration, not a COLORREF RGB value.

.NET Framework Security

See Also

Reference

IVsPackageDefinedTextMarkerType Interface

Microsoft.VisualStudio.TextManager.Interop Namespace