IVsColorableItem.GetDefaultColors(COLORINDEX[], COLORINDEX[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义自定义可着色项的默认背景色和前景色。
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
参数
- piForeground
- COLORINDEX[]
弄返回一个包含前景色的整数。 有关详细信息,请参阅 COLORINDEX
- piBackground
- COLORINDEX[]
弄返回一个包含背景色的整数。 有关详细信息,请参阅 COLORINDEX
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 textmgr:
HRESULT IVsColorableItem::GetDefaultColors(
[out] COLORINDEX *piForeground,
[out] COLORINDEX *piBackground
);
返回的颜色值取自 COLORINDEX 枚举,并本质上是索引到预定义的颜色列表。