Toolbars in Vista - Dropdown Problem

Okay... in windows vista I cannot seem to get the dropdown button to display correctly.

I apply the styles that are neccesary... if i do not set TBSTYLE_EX_DRAWDDOWN, then it works perfect. Yet without that flag I do not get the little arrow on the side - aka spilt-button effect.

When that flag is set, the dropdown menu still works, BUT the dropdown arrow is always shown and it looks quite horrible. In vista I believe this is wrong, because in windowsForms hiding the arrow when the mouse isnt over it is possible. And all windowsForms is.. is a fancy wrapper for WinApi.

I tried setting TBSTYLE_EX_DOUBLEBUFFER, and the arrow vanishes for the most part UNLESS, I hover over the dropdown arrow and then move the mouse straight to another toolbar button. Then the arrow stays there. Again, looking quite horrible.

Here is the code as it stands now... Any suggestions?

toolBar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL,
WS_CHILD|TBSTYLE_LIST, 0, 0, 0, 0, Handle, NULL, Instance, NULL);
SendMessage(toolBar, TB_BUTTONSTRUCTSIZE, static_cast<WPARAM>(sizeof TBBUTTON), 0);

//Add Toolbar Bitmaps
TBADDBITMAP toolBitmap = {0};
toolBitmap.hInst = HINST_COMMCTRL;
toolBitmap.nID = IDB_STD_LARGE_COLOR;
SendMessage(toolBar, TB_ADDBITMAP, 0, reinterpret_cast<WPARAM>(&toolBitmap));

//Add Toolbar Buttons
TBBUTTON toolButtons[2] = {0};

toolButtons[0].iBitmap = STD_FIND;
toolButtons[0].fsState = TBSTATE_ENABLED;
toolButtons[0].fsStyle = BTNS_BUTTON|BTNS_DROPDOWN;
toolButtons[0].idCommand = IDTB_SCAN;

toolButtons[1].iBitmap = STD_DELETE;
toolButtons[1].fsState = TBSTATE_ENABLED;
toolButtons[1].fsStyle = BTNS_BUTTON;
toolButtons[1].idCommand = 0;

SendMessage(toolBar, TB_ADDBUTTONS, sizeof toolButtons/sizeof TBBUTTON,
reinterpret_cast<WPARAM>(&toolButtons));

SendMessage(toolBar, TB_AUTOSIZE, 0, 0);
SendMessage(toolBar, TB_SETEXTENDEDSTYLE, 0,
static_cast<LPARAM>(TBSTYLE_EX_DRAWDDARROWS|TBSTYLE_EX_DOUBLEBUFFER));
[2128 byte] By [Blobmiester] at [2007-11-20 10:01:28]