problem mit toolbar
-
hallo leute,
ich hab mal folgendes problem.#define BUTTON 4 TBBUTTON tbButton[] = { { 0 , ID_NEUERDATENBANKPFAD , TBSTATE_ENABLED , TBSTYLE_BUTTON , 0 , 0 }, { 1 , ID_SUCHEEINTRAG , TBSTATE_ENABLED , TBSTYLE_BUTTON , 0 , 0 }, { 0 , 0 , TBSTATE_ENABLED , TBSTYLE_SEP , 0 , 0 }, { 2 , ID_SPEICHERN , TBSTATE_ENABLED , TBSTYLE_BUTTON , 0 , 0 }, { 3 , ID_EINTRAGLOESCHEN , TBSTATE_ENABLED , TBSTYLE_BUTTON , 0 , 0 } }; ... .. . iccControls.dwICC = ICC_BAR_CLASSES; iccControls.dwSize = sizeof( INITCOMMONCONTROLSEX ); InitCommonControlsEx( &iccControls ); hBitmap = (HBITMAP)LoadImage( 0 , "Grafiken/Menu.bmp" , IMAGE_BITMAP , 0 , 0 , LR_LOADFROMFILE ); if( !hBitmap ) Error("Fehler beim laden"); hToolbar = CreateToolbarEx( hWnd , WS_VISIBLE | WS_CHILD | TBSTYLE_TOOLTIPS | WS_CLIPSIBLINGS | TBSTYLE_FLAT , 999 , BUTTON , 0 , (UINT)hBitmap , tbButton , 5 , 16 , 16 , 16 , 16 , sizeof( TBBUTTON ) );
das ergebnis könnt ihr hier [url] http://www.atomtests.de/programm.gif [/url] bewundern.
es wird kein hintergrund gezeichnet , ka warum.
lass ich aber das TBSTYLE_FLAT weg geht es...weiss leider nicht mehr weiter, über hilfe würde ich mich sehr freuen.
-
hat keiner eine idee ?
-
registrier dich erstmal!
-
so nun bin ich registriert
hast du jetzt nen tipp ?
-
keiner ne idee ?
-
Hallo,
ich kenne mich mit Toolbars nicht aus, aber in der Dokumentation zu TBSTYLE_FLAT steht doch das die Toolbar bei diesem Style transparent dargestellt wird.
In a flat toolbar, both the toolbar and the buttons are transparent...
-
oh, der/die/das toolbar wird auch transparent ? das ist mist.
was kann ich da machen ? um das gewünschte ziel trotzdem zu erreichen ?
-
Hallo,
du könntest die Toolbar einfach subclassen und in WM_ERASEBKGND den Hintergrund selbst zeichnen.
-
jo genau, das versuch ich auch gerade
danke für deine hilfe