I've created a toolbar using MFC's CToolBarCtrl class and I'm trying to add
a button that has the BTNS_DROPDOWN style and it creates as a standart
button and ignores the dropdown option, if I create with BTNS_WHOLEDROPDOWN
it creates the dropdown button but they behave differently of what I want.
I have created another program that doesn't use MFC (it uses API calls only)
and I have created the same toolbar using CreateToolbarEx() and the
BTNS_DROPDOWN works beatifully.
On both programs, I have set _WIN32_IE=0x0500, and using platform SDK on
both.
Does anyone knows why is this happening?
PS: I have set the same style on both toolbars.
ws = WS_CHILD | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | WS_CLIPCHILDREN |
TBSTYLE_EX_DRAWDDARROWS | WS_CLIPSIBLINGS | CCS_NODIVIDER | CCS_NORESIZE
| WS_VISIBLE | TBSTYLE_TRANSPARENT;
a = CToolBarCtrl::CreateEx (0,TOOLBARCLASSNAME,"MyToolbar",ws,
rcClientParent, pWndParent,NULL,NULL);
Thanks a lot,
Gustavo Badauy
I'm certainly no toolbar expert (Hi, Ajay), but have you tried creating the CToolBarCtrl without the
TBSTYLE_EX_DRAWDDARROWS extended style, and then setting it afterward using the SetExtendedStyle
function? I can find no documentation of it, but it's possible that the CreateToolbarEx API function
knows what to do with that extended style bit. I don't know, but taking you at your word that it
works when you use CreateToolbarEx it seems a reasonable conclusion. In either event, it certainly
is the case that CreateToolbarEx is not the same thing as CToolBarCtrl::CreateEx. Which would then
account for the different result.
HTH,
Jeff...
--
Please post all follow-ups to the newsgroup only.
I did what you said and it worked beatifully.
Thanks a lot!
"Jeff Partch" <airb...@airmail.net> wrote in message
news:uED2PHbUAHA.181@cppssbbsa03...