How to reduce the height of CComboBox control in MFC?

Posted on 2006-06-03
Last Modified: 2013-11-20
I am aware that with the SetItemHeight(...) function of the CComboBox class, one can increase the height of a combo box. But if one needs to reduce the height of a combo box, How to do this?

Thanks in advance.


Question by:amit_chuks
    1 Comment
    LVL 22

    Accepted Solution

    You should be able to change the height using SetWindowPos / MoveWindow.

    if you want to change the height of the listbox portion You may have to subclass individual windows of the CComboBox. After subclassing, change the height of the listbox portion. Following shows how to subclass:

    HOWTO: Subclass CListBox and CEdit Inside of CComboBox ID: Q174667



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
    Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now