다음을 통해 공유


CToolBarCtrl::SetColorScheme

현재 도구 모음 컨트롤의 색 구성표를 설정합니다.

void SetColorScheme(
     const COLORSCHEME* lpColorScheme
);

매개 변수

Parameter

설명

[in] lpColorScheme

포인터는 COLORSCHEME 강조 색 및 그림자 색 도구 모음 컨트롤에 대해 설명 하는 구조입니다.

설명

이 이렇게 하면 주지는 Windows Vista 시각적 테마를 설정 합니다.

보내는이 메서드는 TB_SETCOLORSCHEME 에서 설명 하는 메시지는 Windows SDK.

요구 사항

헤더: afxcmn.h

예제

다음 코드 예제에서는 현재 도구 모음 컨트롤에 대 한 색 구성표를 설정 합니다. 코드 예제에서는 빨간색 각 도구 단추 왼쪽 및 위쪽 가장자리와 오른쪽 아래 모서리에 파란색 있습니다. 단추를 누를 때 단추의 빨간색 가장자리 파란색 켜고 파란색 모서리 빨간색으로 바뀝니다.

 //Set color scheme for the current toolbar control.  
    //Make the left and top edges of the tool button red,  
    //and the right and bottom edges blue. The colors  
    //reverse when a button is pressed. 
    //This method has no effect if the Vista visual theme  
    //is set.
    {
    COLORSCHEME cs;
    cs.dwSize = sizeof(COLORSCHEME);
    cs.clrBtnHighlight = RGB( 255, 0, 0 );
    cs.clrBtnShadow    = RGB( 0, 0, 255 );
    CToolBarCtrl& m_toolBarCtrl = m_wndToolBar.GetToolBarCtrl();
    m_toolBarCtrl.SetColorScheme( &cs );
    }

참고 항목

참조

CToolBarCtrl 클래스

계층 구조 차트

TB_SETCOLORSCHEME

COLORSCHEME

CToolBarCtrl::GetColorScheme