Metoda IVsFontAndColorUtilities.GetEncodedVSColor — (UInt32, Int32)
Data opublikowania: październik 2016
Uzyskać prawidłowy element członkowski __VSSYSCOLOREX Wyliczenie odpowiadający dostarczony COLORREF.
Przestrzeń nazw: Microsoft.VisualStudio.Shell.Interop
Zestaw: Microsoft.VisualStudio.Shell.Interop.8.0 (w Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Składnia
int GetEncodedVSColor(
uint crSource,
out int pVSColor
)
int GetEncodedVSColor(
unsigned int crSource,
[OutAttribute] int% pVSColor
)
abstract GetEncodedVSColor :
crSource:uint32 *
pVSColor:int byref -> int
Function GetEncodedVSColor (
crSource As UInteger,
<OutAttribute> ByRef pVSColor As Integer
) As Integer
Parametry
crSource
Type: System.UInt32[in] Reprezentacja COLORREF wartości koloru.
pVSColor
Type: System.Int32[out] Prawidłowymi elementami członkowskimi typu __VSSYSCOLOREX odpowiadające wyliczenie crSource.
Wartość zwracana
Type: System.Int32
Jeśli metoda zakończy się pomyślnie, zwraca S_OK. Jeśli nie, zwraca kod błędu.
Uwagi
COLORREFcrSource Używany jako dane wejściowe muszą typu CT_VSCOLOR zwrócone przez GetColorType.
Jeśli wystąpi błąd, wartość pVSColor jest niezdefiniowany.
Zarządzany kod można uzyskać funkcja GetSysColor z SystemColors i konwersji między COLORREF i System.Drawing.Color struktury przy użyciu M:System.Drawing.ColorTranslator.FromWin32 i M:System.Drawing.ColorTranslator.ToWin32.
Zobacz też
Interfejs IVsFontAndColorUtilities
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop
Używanie czcionek i kolorów
Powrót do początku