CToolBarCtrl Hintergrund nicht transparent



  • Hallo

    mein Dialog hat eine Toolbar, diese wird über

    m_toolbar.CreateEx(WS_EX_TRANSPARENT, WS_CHILD |WS_VISIBLE | CCS_NORESIZE | CCS_NODIVIDER , CRect(0,0,0,0), this, 1456);

    erzeugt

    Es handelt sich um die Klasse CToolBarCtrl und nicht um CToolBar.

    Aber der hintergrund wird so hellgrau dargestellt, obwohl da ja transparent
    übergeben wird.

    Hat jemand ne idee? ich will die gleiche farbe wie der dahinterliegende dialog,
    bzw transparent.

    Danke schön !


  • Mod

    WS_EX_TRANSPARENT sagt nicht, dass der Hintergrund Transparent ist. Es hat transparente Eigenschaften wenn es den Hintergrund nicht zeichnet. Aber genau das macht ein Toolbar!

    Wie immer ist es das Beste mal die Doku zu lesen:
    http://msdn2.microsoft.com/en-us/library/tf5d6ca2(VS.80).aspx

    A transparent toolbar allows the client under the toolbar to show through. To create a transparent toolbar, use both TBSTYLE_FLAT and TBSTYLE_TRANSPARENT styles. Transparent toolbars feature hot tracking; that is, when the mouse pointer moves over a hot button on the toolbar, the button's appearance changes. Toolbars created with just the TBSTYLE_FLAT style will contain buttons that are not transparent.


Anmelden zum Antworten