: Why don't you use a rebar that contains the combobox and the toolbar? It's an easiest way to do it (owner drawn buttons give lots of problems...).
:
: nICO
:
:
:
How beautiful, if Sorrow had not made sorrow more beautiful than Beauty itself.
: JOHN KEATS
:
:
:
Yeah... I decided to do so too. But I'm having problems with creating theese bars in rebar. I'm doing it just like in the example in the documentation, but it doesn't work!
/*
fce: createToolbars
popis: Vytvori rebar s toolbarem a comboboxem
*/
HWND createToolbars (HWND hWnd)
{
//vytvorim rebar
HWND rebar = CreateWindowEx (
WS_EX_TOOLWINDOW,
TOOLBARCLASSNAME,
NULL,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
| RBS_VARHEIGHT,
0, 0, 0, 0,
hWnd,
(HMENU)IDC_REBAR,
hInstance,
NULL
);
REBARINFO ri;
ri.cbSize = sizeof (ri);
ri.fMask = 0;
ri.himl = NULL;
SendMessage (rebar, RB_SETBARINFO, 0, (LPARAM)&ri);
//pridam toolbar a combobox
REBARBANDINFO rbi;
rbi.cbSize = sizeof (rbi);
rbi.fMask = RBBIM_STYLE | RBBIM_CHILD;
//toolbar
rbi.hwndChild = createTopToolbar (rebar);
rbi.cyMaxChild = 500;
rbi.cyMinChild = 100;
rbi.cyChild = 200;
rbi.cx = 200;
if (!SendMessage (rebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbi))
MessageBeep (0);
return rebar;
}
I don't have even an idea what's wrong (of course that you'll look at it and see a huge mistake :). At least I hope so...).
Oxygenium