Annoying MFC CComboBox Issue
In my program I have a dialog which has a Combo Box set to Drop List. The items are added progmatically, but when I go to open the Combo Box, it opens with a height of 1 pixel. I''ve tried to use some of the MFC CComboBox::Set.. Functions just to see if it does anything, but none of them have any effect. Note that I am developing on Pocket PC, but I''ve had this problem on x86 too.
I had a very similar thing happen to me. In the resource editor change the style of the dropdown so that it''s a multiselect list box. Compile and run your code.
Magically any items you Add() to the list box will appear, now set the style of the box back to a dropdown. Compile and run your code, for me this magically mad the dropdown start working.
It''s worth a shot.
Magically any items you Add() to the list box will appear, now set the style of the box back to a dropdown. Compile and run your code, for me this magically mad the dropdown start working.
It''s worth a shot.
The resource editor is a bit odd about setting the size of the drop-down part. I think you need to click on the down arrow part of the combo box for the resource editor to show you the size of the drop-down part. When you do that, just drag that thing down a ways.
Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.
Proxima Rebellion - A 3D action sim with a hint of strategy
Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.
Proxima Rebellion - A 3D action sim with a hint of strategy
Dunno if it''s what you''re looking for, but try in the resoure editor clicking on the down arrow then resizing. Maybe this is something you''ve already done, but took me a bloody long time to find out about this.
Suppose you want the dropdown list to be 100 px high, try this:
"Oh no, not again" - Agrajag
CRect r;m_wndCombo.GetWindowRect(r);m_wndCombo.SetWindowPos(NULL, 0, 0, r.Width(), 100, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
"Oh no, not again" - Agrajag
I don''t want to meet the guy who designed this drop-arrow-click-to-resize-combo stuff. He sure has been giving a lot of headaches to the developer community, including me.
______________________________
Oooh, you found the horadric cube!
______________________________
Oooh, you found the horadric cube!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement