Aracılığıyla paylaş


CToolBarCtrl::SetColorScheme

Geçerli araç çubuğu denetimi renk düzenini ayarlar.

void SetColorScheme(
     const COLORSCHEME* lpColorScheme
);

Parametreler

Parametre

Description

[in]lpColorScheme

İşaretçi bir colorscheme toolbar denetiminin rengini gölge ve vurgu rengini tanımlayan bir yapı.

Notlar

Bu yöntemi etkisizdir bir Windows Vista görsel tema ayarlanır.

Bu yöntem gönderir tb_setcolorscheme 'de açıklanan iletiyi Windows SDK.

Gereksinimler

Başlık: afxcmn.h

Örnek

Aşağıdaki kod örneği, geçerli araç çubuğu denetimi için renk düzenini ayarlar.Kod örneği, her aracı düğmesini kırmızı sol ve üst kenarlardaki ve sağ ve alt kenarları mavi yapar.Kullanıcı düğmesine bastığında, kırmızı düğmenin kenarları mavi ve kırmızı mavi, kenarları açın.

    //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 );
    }

Ayrıca bkz.

Başvuru

CToolBarCtrl sınıfı

Hiyerarşi grafik

tb_setcolorscheme

colorscheme

CToolBarCtrl::GetColorScheme