CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    7

    Make a combo-box drop UP in MFC

    Hi,
    I'm using MFC, and I need to make the combo box drop down list to be draw up - above the contro, instead of below it.
    Does anyone know how to make this happen?

    Thanks,
    yakobom

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Make a combo-box drop UP in MFC

    AFAIK Windows itself chooses how to display the combobox dropdown control (below or above) depending on the current combobox position on the screen.
    Victor Nijegorodov

  3. #3
    Join Date
    Dec 2007
    Posts
    7

    Re: Make a combo-box drop UP in MFC

    Yes, I know - but I still need it... Windows cannot know that it drops down on something that the user needs to see and use at that moment... And I'm trying to find a way rather then implementing my own drop window.

    yakobom

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Make a combo-box drop UP in MFC

    Quote Originally Posted by yakobom View Post
    Yes, I know - but I still need it... Windows cannot know that it drops down on something that the user needs to see and use at that moment...
    Then you have to find some other place for your combo. Or change the selection control to something else, as the standard combo is not able to do what you want.
    Best regards,
    Igor

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Make a combo-box drop UP in MFC

    subclass the listbox that's being created, and move if to where you want. You could even have it anywhere on the screen (although that won't be handy )

    You can use GetComboBoxInfo to get the handle of the listbox.

Tags for this Thread

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