Metoda IVsFontAndColorUtilities.GetRGBOfEncodedColor — (UInt32, UInt32, Guid, UInt32)
Data opublikowania: październik 2016
Uzyskiwanie wartości RGB utworzony śledzenia lub indeksowanego COLORREF reprezentacja koloru.
Przestrzeń nazw: Microsoft.VisualStudio.Shell.Interop
Zestaw: Microsoft.VisualStudio.Shell.Interop.8.0 (w Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Składnia
int GetRGBOfEncodedColor(
uint crSource,
uint crAutoColor,
[InAttribute] ref Guid rguidCategory,
out uint pcrResult
)
int GetRGBOfEncodedColor(
unsigned int crSource,
unsigned int crAutoColor,
[InAttribute] Guid% rguidCategory,
[OutAttribute] unsigned int% pcrResult
)
abstract GetRGBOfEncodedColor :
crSource:uint32 *
crAutoColor:uint32 *
rguidCategory:Guid byref *
pcrResult:uint32 byref -> int
Function GetRGBOfEncodedColor (
crSource As UInteger,
crAutoColor As UInteger,
<InAttribute> ByRef rguidCategory As Guid,
<OutAttribute> ByRef pcrResult As UInteger
) As Integer
Parametry
crSource
Type: System.UInt32[in] Reprezentacja COLORREF wartości koloru.
crAutoColor
Type: System.UInt32[in] Reprezentacja COLORREF wartości koloru.
rguidCategory
Type: System.Guid[in] Identyfikator GUID kategorii, w których wartości koloru są mają zostać uzyskane.
pcrResult
Type: System.UInt32[out] Reprezentacja COLORREF wartości koloru zawierające zwrócona wartość RGB.
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żywane jako dane wejściowe muszą być jednego z następujących typów zwracane przez GetColorType:
Jeśli crSource nie jest typu CT_AUTOMATIC, crAutoColor jest ignorowana.
Jeśli crSource jest typu CT_AUTOMATIC, wartość RGB w crAutoColor jest zwracana. Rzeczywistej wartości crSourcer jest ignorowana.
COLORREF Zwracanych w pcrResult ma format szesnastkowy: 0x00bbggrr
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