Combo box doesnt show on toolbar

Yes I know I should be using a rebar but I am not. So please don't advise me to use a rebar. I use the following code:

CRect rect;
int nIndex = m_wndToolBar.GetToolBarCtrl().CommandToIndex(ID_SYSTEMCOMBO);
m_wndToolBar.SetButtonInfo(nIndex, ID_SYSTEMCOMBO, TBBS_SEPARATOR, 125);
m_wndToolBar.GetToolBarCtrl().GetItemRect(nIndex, &rect);
rect.top = 1;
rect.bottom = rect.top + 250; // drop height

m_SystemCombo.Create(CBS_DROPDOWNLIST | CBS_SORT | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL, rect, &m_wndToolBar, ID_SYSTEMCOMBO);
m_SystemCombo.SetItemHeight(-1, 19);

if(fMain.CreatePointFont(80, "MS Sans Serif", NULL))
{
m_SystemCombo.SendMessage(WM_SETFONT, (WPARAM)(HFONT)fMain, MAKELPARAM(TRUE, 0));
}

And initially it showed its ugly mug nicely on the toolbar. After submitting my code someone tested it there and there was just an empty space on the toolbar the size of the missing control. After playing around I now don't have the combo box showing.

What the dickens could be causing this to happen?
[1111 byte] By [richiebabes] at [2007-11-20 11:38:59]
# 1 Re: Combo box doesnt show on toolbar
If I undock the toolbar and drag the right border to the left to make it more square the combo box appears but in completely the wrong place on the toolbar!
richiebabes at 2007-11-10 22:24:41 >
# 2 Re: Combo box doesnt show on toolbar
Can't anyone help? :confused:
richiebabes at 2007-11-10 22:25:41 >
# 3 Re: Combo box doesnt show on toolbar
I don't see any problem with the combo. Try to call RecalcLayout after your toolbar is ready.
VictorN at 2007-11-10 22:26:44 >
# 4 Re: Combo box doesnt show on toolbar
Nope, that didn't work. Might it be something to do with the registry? This has worked on three machines, and not worked on three others. It has stopped working on mine when originally it worked.
richiebabes at 2007-11-10 22:27:49 >
# 5 Re: Combo box doesnt show on toolbar
I used almost the same code and it worked on more than 50 (or, perhaps, 100) different PCs with the Windows 98/NT/2000/XP without any problem!
VictorN at 2007-11-10 22:28:54 >
# 6 Re: Combo box doesnt show on toolbar
Arghh! I know, I know! It's so frustrating... I can't find anything in the code that might be causing this, and it worked at first. I tested it, all worked fine. And then I submitted my code, someone else updated on their machine, ran, and it stopped working. So he send me his ini file just in case something there was causing it, it failed. I put my ini file back in and it continued to not work. Nothing in the ini file though that might cause it.

Argghhhhhhhh!!!!
richiebabes at 2007-11-10 22:29:53 >
# 7 Re: Combo box doesnt show on toolbar
Works fine on my system, and the code looks fine, not sure what the issue is.

Try including CBS_NOINTEGRALHEIGHT in your combobox style and see if that does anything?
bderagon at 2007-11-10 22:30:50 >