# DM_LISTSORT

The DM_LISTSORT message is sent to the dialog manager to sort the elements of a DI_COMBOBOX or DI_LISTBOX list.

### Param1

The ID of the dialog item to sort.

### Param2

Sort direction: 0 - ascending, 1 - descending.

### Return

TRUE - the list has been sorted.
FALSE - error sorting list.

### Controls

Control | Description
--- | ---
DI_LISTBOX | list
DI_COMBOBOX | combined list

### Remarks

### Example

    // sort the list descending (from 'Z' to 'A')
    Info.SendDlgMessage(hDlg,DM_LISTSORT,ID,1);

See also:
DialogEx