共用方式為


IVsColorableItem.GetDefaultColors 方法

定義自訂的可設定色彩項目預設背景和前景色彩。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
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

參數

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

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

傳回的色彩值取自COLORINDEX列舉,本質上為預先定義的色彩] 清單中的索引。

.NET Framework 安全性

請參閱

參考

IVsColorableItem 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間