使Windows工具栏变平(不是渐变色)

时间:2014-09-11 18:02:18

标签: c++ winapi

C ++项目,CodeLite,Win7。它显示了看起来像渐变的工具栏

toolb

我想让它变平,所以看起来不像"蓝色渐变"像现在一样但是平面颜色(按钮面的颜色)。怎么做? 栏创建时带有代码:

const TBBUTTON defaultButtons[] = {
//iBitmap, idCommand, fsState, fsStyle, dwData, iString
{ IDB_BITMAP_CONNECT, IDB_BUTTON_TOOLBAR_CONNECT, 0, TBSTYLE_DROPDOWN, {0,0}, 0, 0},
//IDB_BITMAP_DISCONNECT
{ 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, {0,0}, 0, 0},
{ IDB_BITMAP_DOWNLOAD, IDB_BUTTON_TOOLBAR_DOWNLOAD, 0, BTNS_BUTTON, {0,0}, 0, 0},
{ IDB_BITMAP_UPLOAD, IDB_BUTTON_TOOLBAR_UPLOAD, 0, BTNS_BUTTON, {0,0}, 0, 0},

...

Toolbar::Toolbar() :
    Window(NULL, TOOLBARCLASSNAME),
    m_nrButtons(0),
    m_buttons(NULL),
    m_buttonMenus(NULL),
    m_connectBitmapIndex(-1),
    m_disconnectBitmapIndex(-1),
    m_rebar(NULL)
{
    m_exStyle = WS_EX_PALETTEWINDOW;
    m_style = WS_CHILD|/*WS_VISIBLE|*/WS_CLIPCHILDREN|WS_CLIPSIBLINGS|TBSTYLE_TOOLTIPS|CCS_TOP|TBSTYLE_FLAT|BTNS_AUTOSIZE|CCS_NOPARENTALIGN|CCS_NORESIZE|CCS_NODIVIDER;
}

0 个答案:

没有答案