CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2002
    Location
    Chicago, IL
    Posts
    255

    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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    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.

  3. #3
    Join Date
    Aug 2005
    Posts
    104

    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.

  4. #4
    Join Date
    Mar 2002
    Location
    Chicago, IL
    Posts
    255

    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.

  5. #5
    Join Date
    Mar 2002
    Location
    Chicago, IL
    Posts
    255

    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.
    Attached Files Attached Files
    Last edited by sjc; September 30th, 2005 at 07:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured