How do I get CreateToolbarEx() to take TBSTYLE_FLAT in order to make my toolbar a coolbar without it behaving as if I also specified TBSTYLE_TRANSPARENT?
My problem is that when I add TBSTYLE_FLAT to my toolbar (that was working fine beforehand)...
hWndToolbar = CreateToolbarEx(
hwndParent, // parent
//WS_CHILD | WS_BORDER | WS_VISIBLE | TBSTYLE_TOOLTIPS,
WS_CHILD | WS_BORDER | WS_VISIBLE | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT,
ID_TOOLBAR, // toolbar id
//DB increased next line to add buttons
//24, // number of bitmaps
26, // number of bitmaps (i.e. number of non-separator buttons)
hInst, // mod instance
IDB_TOOLBAR, // resource ID for bitmap
(LPCTBBUTTON)&tbButtons,// address of buttons
//DB adjusted number in next line to accomodate above adjustments
//32, // number of buttons (including separators)
34, // number of buttons (including separators)
16,16, // width & height of buttons in pixels
16,16, // width & height of bitmaps in pixels
sizeof(TBBUTTON)); // structure size
... the resulting coolbar has a white/transparent background with hovering not working properly. I want a grey background such as appears in the background of Office 2003.
I read on the Web that there is a bug where TBSTYLE_FLAT wrongly invokes TBSTYLE_TRANSPARENT as well automatically, and a solution is to unload TBSTYLE_TRANSPARENT afterward... but I don't know how to do that.