Partager via


Combo Boxes Messages

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The following table shows the combo box messages, with a description of the purpose of each.

Programming element Description

CB_ADDSTRING

This message is sent by an application to add a string to the list box of a combo box.

CB_DELETESTRING

This message is sent by an application to delete a string in the list box of a combo box.

CB_FINDSTRING

This message is sent by an application to search the list box of a combo box for an item beginning with the characters in a specified string.

CB_FINDSTRINGEXACT

This message is sent by an application to find the first list box string in a combo box that matches the string specified in the lpszFind parameter.

CB_GETCOMBOBOXINFO

This message is sent by an application to retrieve information about the specified combo box.

CB_GETCOUNT

This message is sent by an application to retrieve the number of items in the list box of a combo box.

CB_GETCURSEL

This message is sent by an application to retrieve the index of the currently selected item, if any, in the list box of a combo box.

CB_GETDROPPEDCONTROLRECT

This message is sent by an application to retrieve the screen coordinates of the drop-down list box of a combo box.

CB_GETDROPPEDSTATE

This message is sent by an application to determine whether the list box of a combo box is dropped down.

CB_GETDROPPEDWIDTH

This message is sent by an application to retrieve the minimum allowable width, in pixels, of the list box of a combo box with the CBS_DROPDOWN or CBS_DROPDOWNLIST style.

CB_GETEDITSEL

This message is sent by an application to get the starting and ending character positions of the current selection in the edit control of a combo box.

CB_GETEXTENDEDUI

This message is sent by an application to determine whether a combo box has the default user interface or the extended user interface.

CB_GETHORIZONTALEXTENT

This message is sent by an application to retrieve from a combo box the width, in pixels, by which the list box can be scrolled horizontally (the scrollable width).

CB_GETITEMDATA

This message is sent by an application to a combo box to retrieve the application-supplied 32-bit value associated with the specified item in the combo box.

CB_GETITEMHEIGHT

This message is sent by an application to determine the height of list items or the selection field in a combo box.

CB_GETLBTEXT

This message is sent by an application to retrieve a string from the list of a combo box.

CB_GETLBTEXTLEN

This message is sent by an application to retrieve the length, in characters, of a string in the list of a combo box.

CB_GETLOCALE

This message is sent by an application to retrieve the current locale of the combo box.

CB_GETTOPINDEX

This message is sent by an application to retrieve the zero-based index of the first visible item in the list box portion of a combo box.

CB_INITSTORAGE

This message is sent by an application before adding a large number of items to the list box portion of a combo box.

CB_INSERTSTRING

This message is sent by an application to insert a string into the list box of a combo box.

CB_LIMITTEXT

This message is sent by an application to limit the length of the text the user may type into the edit control of a combo box.

CB_RESETCONTENT

This message is sent by an application to remove all items from the list box and edit control of a combo box.

CB_SELECTSTRING

This message is sent by an application to search the list of a combo box for an item that begins with the characters in a specified string.

CB_SETCURSEL

This message is sent by an application to select a string in the list of a combo box.

CB_SETDROPPEDWIDTH

This message is sent by an application to set the maximum allowable width, in pixels, of the list box of a combo box with the CBS_DROPDOWN or CBS_DROPDOWNLIST style.

CB_SETEDITSEL

This message is sent by an application to select characters in the edit control of a combo box.

CB_SETEXTENDEDUI

This message is sent by an application to select either the default user interface or the extended user interface for a combo box that has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.

CB_SETHORIZONTALEXTENT

This message is sent by an application to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width).

CB_SETITEMDATA

This message is sent by an application to set the 32-bit value associated with the specified item in a combo box.

CB_SETITEMHEIGHT

This message is sent by an application to set the height of list items or the selection field in a combo box.

CB_SETLOCALE

This message is sent by an application to set the current locale of the combo box.

CB_SETTOPINDEX

This message is sent by an application to ensure that a particular item is visible in the list box of a combo box.

CB_SHOWDROPDOWN

This message is sent by an application to show or hide the list box of a combo box that has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.

CBN_CLOSEUP

This message is sent when the list box of a combo box has been closed.

CBN_DBLCLK

This message is sent when the user double-clicks a string in the list box of a combo box.

CBN_DROPDOWN

This message is sent when the list box of a combo box is about to be made visible.

CBN_EDITCHANGE

This message is sent after the user has taken an action that may have altered the text in the edit control portion of a combo box.

CBN_EDITUPDATE

This message is sent when the edit control portion of a combo box is about to display altered text.

CBN_ERRSPACE

This message is sent when a combo box cannot allocate enough memory to meet a specific request.

CBN_KILLFOCUS

This message is sent when a combo box loses the keyboard focus.

CBN_SELCHANGE

This message is sent when the selection in the list box of a combo box is about to be changed as a result of the user either clicking in the list box or changing the selection by using the arrow keys.

CBN_SELENDCANCEL

This message is sent when the user selects an item, but then selects another control or closes the dialog box.

CBN_SELENDOK

This message is sent when the user clicks a list item, or selects an item and then closes the list.

CBN_SETFOCUS

This message is sent when a combo box receives the keyboard focus.

WM_DRAWITEM

This message is sent to the owner window of an owner-drawn button or menu when a visual aspect of the button or menu has changed.

WM_MEASUREITEM

This message is sent to the owner window of an owner-drawn button or menu item when the control or menu is created.

See Also

Reference

Combo Boxes Reference