Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Combo Box Height

This topic is 6665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All, Does any knows how to change the Height of the Combo Box? e.g h_Main = CreateWindow ( AppName, "Access Calculator v1.1", WS_CHILD, 0, //x coordinate 0, // y coordinate 100, //width 50, //height <---this is only for the drop down height hwnd, NULL, hInstance, NULL); Thanks in advance! DES3D

Share this post

Link to post
Share on other sites
(Taken from the Win32 API docs..)

An application sends a CB_SETITEMHEIGHT message to set the height of list items or the selection field in a combo box.

To send this message, call the SendMessage function with the following parameters.

(HWND) hWnd, // handle to destination window
CB_SETITEMHEIGHT, // message to send
(WPARAM) wParam; // item index
(LPARAM) lParam; // item height

wParam - Specifies the component of the combo box for which to set the height. This parameter must be –1 to set the height of the selection field. It must be zero to set the height of list items, unless the combo box has the CBS_OWNERDRAWVARIABLE style. In that case, the wParam parameter is the zero-based index of a specific list item.

lParam - Specifies the height, in pixels, of the combo box component identified by wParam.

Return Values
If the index or height is invalid, the return value is CB_ERR.

The selection field height in a combo box is set independently of the height of the list items. An application must ensure that the height of the selection field is not smaller than the height of a particular list item.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!