CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: ComboBoxEx

  1. #1
    Join Date
    Feb 2008
    Posts
    5

    ComboBoxEx

    I'm not sure whether this is a common question, but again google returned few useful results.
    So I set up the comboboxex correctly, all of it. I add items, it works. However, when I click the dropdown button (it's on CBS_DROPDOWNLIST), nothing happens. The items are there, I can access them using the arrow keys. I've found people saying you need to resize the child combobox that's inside the Ex, as well as people saying you need to resize the Ex, or send a CB_SHOWDROPDOWN message to the child combobox (the latter just makes my app run slow for the first few seconds). So I have no clue what to do next. Unless this is a normal behavior and I should be handling the dropdown myself. I wouldn't know, this is my first time using Combo Boxes with winapi.
    If anyone could tell me what are the exact procedures for using a ComboBoxEx, I'd appreciate.
    Thanks in advance.

  2. #2
    Join Date
    May 2007
    Posts
    680

    Exclamation Re: ComboBoxEx

    Lucky for you I have made a program for people starting with Combo Boxes and its shows how to use all three, I'm sure you would love it so here -

    Edit - I'm sorry to say that it does not use ComboBoxEx :9
    Attached Files Attached Files
    Just sayin' but I'm 14(I'm telling you this so you know what sort of language to use).
    Advice received by a user.

  3. #3
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: ComboBoxEx

    Quote Originally Posted by koler432
    If anyone could tell me what are the exact procedures for using a ComboBoxEx, I'd appreciate.
    I suspect that the height of you combobox is too small.
    Note that the rectangle you pass to the Create() function is a rectangle for a drop-down state, so make sure that its height is sufficient.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  4. #4
    Join Date
    Feb 2008
    Posts
    5

    Re: ComboBoxEx

    The height indeed was too small. And the thing is, I remember trying to set a huge number on SetWindowPos(), but the genius here (me) didn't read the SetWindowPos() reference at all, so I just found out I was setting the uFlags param, not the height. The good thing is that I can blame my stupidity yesterday on the lack of sleep. ;D
    Thanks guys, you were all of much help.

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