CComboBox list doesn't show?
I can't quite figure this one out, but I have a combo box that initially has an empty list (no items). Sometimes when running the application, clicking on the combo box button to display the list shows the empty list. Other times clicking the button has no effect and no list is shown. I can't understand why. When items are added to this list, it always shows. But sometimes it doesn't show when there are no items. Has anyone run into this before? Anyone have any ideas why this happens? Thanks.
- Steve
Re: CComboBox list doesn't show?
Not exactly like that, but in your resource editor, click the arrow on the combo and make sure the drop list is an appropriate size.
Re: CComboBox list doesn't show?
I don't know how you're sizing it, but comboboxes are weird, in that the size you give them is the size of the box itself plus the dropdown height. So if they are sized only big enough for the box itself, then that could be your issue.
Re: CComboBox list doesn't show?
The list box itself has more than enough enough height, so it's not that. Here's my definition in the resource file:
Code:
COMBOBOX IDC_COMBO_DATA,91,18,76,86,CBS_DROPDOWNLIST |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
It must be something else.
1 Attachment(s)
Re: CComboBox list doesn't show?
Here's an update. My project has a built-in manifest file to support XP style controls. In my .rc file, I have this:
Code:
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "res\\MyApp.manifest"
It appears this has something to do with it because when it's removed, the empty list does display. What could this have to do with anything?
I've attached a sample project that, when built, doesn't appear to display the combo box list when running on WinXP (haven't tried Win2K) on SOME machines. On my WinXP machine, it displays fine. On other people's machine I've tried this on, it doesn't.