Partager via


IVsColorableItem.GetDefaultColors(COLORINDEX[], COLORINDEX[]) Method

Definition

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

public:
 int GetDefaultColors(cli::array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ piForeground, cli::array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ piBackground);
public:
 int GetDefaultColors(Platform::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ piForeground, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ piBackground);
int GetDefaultColors(std::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> const & piForeground, std::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> const & piBackground);
public int GetDefaultColors (Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] piForeground, Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] piBackground);
abstract member GetDefaultColors : Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] * Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] -> int
Public Function GetDefaultColors (piForeground As COLORINDEX(), piBackground As COLORINDEX()) As Integer

Parameters

piForeground
COLORINDEX[]

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

piBackground
COLORINDEX[]

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

Returns

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.

Applies to