Partager via


CDragListBox Class

In addition to providing the functionality of a Windows list box, the CDragListBox class allows the user to move list box items, such as filenames, within the list box.

class CDragListBox : public CListBox

Remarks

List boxes with this capability allow users to order the items in a list in whatever manner is most useful to them. By default, the list box will move the item to the new location in the list. However, CDragListBox objects can be customized to copy items instead of moving them.

The list box control associated with the CDragListBox class must not have the LBS_SORT or the LBS_MULTIPLESELECT style. For a description of list box styles, see List-Box Styles.

To use a drag list box in an existing dialog box of your application, add a list box control to your dialog template using the dialog editor and then assign a member variable (of Category Control and Variable Type CDragListBox) corresponding to the list box control in your dialog template.

For more information on assigning controls to member variables, see Shortcut for Defining Member Variables for Dialog Controls.

Requirements

Header: afxcmn.h

See Also

Concepts

TSTCON Sample: ActiveX Control Test Container

CDragListBox Members

CListBox Class

Hierarchy Chart

CListBox Class