Udostępnij za pośrednictwem


Metoda IVsFontAndColorUtilities.GetColorType — (UInt32, Int32)

 

Data opublikowania: październik 2016

Uzyskać typu reprezentacji kolorów w 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 GetColorType(
    uint crSource,
    out int pctType
)
int GetColorType(
    unsigned int crSource,
    [OutAttribute] int% pctType
)
abstract GetColorType : 
        crSource:uint32 *
        pctType:int byref -> int
Function GetColorType (
    crSource As UInteger,
    <OutAttribute> ByRef pctType As Integer
) As Integer

Parametry

  • crSource
    Type: System.UInt32

    [in] Reprezentacja COLORREF wartości koloru.

  • pctType
    Type: System.Int32

    [out] Liczbę całkowitą reprezentującą typ 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

Wartość pctType będzie członkiem __VSCOLORTYPE wyliczenia.

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