IVsPackageDefinedTextMarkerType.GetDefaultColors Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the default foreground and background colors for a marker.
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] Pointer to the default foreground color. For a list of piForeground
values, see COLORINDEX4C54D3F1-4AEB-497F-8311-2AB027C8BAD8.
- piBackground
- COLORINDEX[]
[out] Pointer to the default background color. For a list of piBackground
values, see COLORINDEX4C54D3F1-4AEB-497F-8311-2AB027C8BAD8.
Returns
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.