IVsFontAndColorUtilities.GetEncodedIndex(UInt32, COLORINDEX[]) Méthode

Définition

Obtient un membre valide de l' COLORINDEX énumération correspondant à un COLORREF fourni.

public:
 int GetEncodedIndex(System::UInt32 crSource, cli::array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ pIdx);
public:
 int GetEncodedIndex(unsigned int crSource, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> ^ pIdx);
int GetEncodedIndex(unsigned int crSource, std::Array <Microsoft::VisualStudio::TextManager::Interop::COLORINDEX> const & pIdx);
public int GetEncodedIndex (uint crSource, Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] pIdx);
abstract member GetEncodedIndex : uint32 * Microsoft.VisualStudio.TextManager.Interop.COLORINDEX[] -> int
Public Function GetEncodedIndex (crSource As UInteger, pIdx As COLORINDEX()) As Integer

Paramètres

crSource
UInt32

[in] Représentation de COLORREF de la valeur de couleur.

pIdx
COLORINDEX[]

à Membre valide de l' COLORINDEX énumération correspondant à crSource .

Retours

Int32

Si la méthode réussit, retourne S_OK. En cas d'échec, retourne un code d'erreur.

Remarques

Le COLORREF crSource utilisé comme entrée doit être un type de CT_COLORINDEX tel qu’il est retourné par GetColorType .

Si une erreur se produit, la valeur de pIdx n’est pas définie.

Le code managé peut obtenir des fonctionnalités équivalentes à GetSysColor avec et effectuer une SystemColors conversion entre COLORREF et la System.Drawing.Color structure à l’aide M:System.Drawing.ColorTranslator.FromWin32 de et de M:System.Drawing.ColorTranslator.ToWin32 .

S’applique à