다음을 통해 공유


IVsHiColorItem.GetColorData 메서드

지정 된 요소에 대 한 RGB 값을 검색합니다.

네임스페이스:  Microsoft.VisualStudio.TextManager.Interop
어셈블리:  Microsoft.VisualStudio.TextManager.Interop.8.0(Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

구문

‘선언
Function GetColorData ( _
    cdElement As Integer, _
    <OutAttribute> ByRef pcrColor As UInteger _
) As Integer
int GetColorData(
    int cdElement,
    out uint pcrColor
)
int GetColorData(
    [InAttribute] int cdElement, 
    [OutAttribute] unsigned int% pcrColor
)
abstract GetColorData : 
        cdElement:int * 
        pcrColor:uint32 byref -> int
function GetColorData(
    cdElement : int, 
    pcrColor : uint
) : int

매개 변수

  • cdElement
    형식: Int32

    [in] 값은 __tagVSCOLORDATA 색을 얻을 수에 대 한 요소를 식별 하는 열거형입니다.

  • pcrColor
    형식: UInt32%

    [out] 요청 된 RGB 값입니다.

반환 값

형식: Int32
성공 하면 반환 S_OK. 그렇지 않으면 오류 코드를 반환 합니다.

설명

COM 시그니처

Textmgr2.idl에서

interface IVsHiColorItem : IUnknown
    {
        HRESULT GetColorData([in] VSCOLORDATA cdElement,
                             [out] COLORREF* pcrColor);
    };

반환 된 RGB 값을 Win32 됩니다 COLORREF 값입니다.

관리 되는 코드에서 RGB 값을 변환할 수 있는 COLORREF 값을 사용 하는 코드.

    uint colorRef = (uint)System.Drawing.ColorTranslator.ToWin32(
                              System.Drawing.Color.FromArgb(r, g, b));

관리 되지 않는 코드에서 사용 하는 RGB 매크로 만들 수는 COLORREF 값, 예를 들어, RGB(0x00, 0xff,0x00).

.NET Framework 보안

참고 항목

참조

IVsHiColorItem 인터페이스

Microsoft.VisualStudio.TextManager.Interop 네임스페이스