DM_LISTDELETE

Far Manager

DM_LISTDELETE

The DM_LISTDELETE message is sent to the dialog manager to delete items from a DI_COMBOBOX or DI_LISTBOX list.

Param1

The ID of the dialog item from which the items should be deleted.

Param2

Pointer to a FarListDelete structure describing the delete parameters, or NULL.

Return

TRUE if the items have been deleted from the list.
FALSE if an error occurred while deleting data.

Controls

ControlDescription
DI_LISTBOX list
DI_COMBOBOX combined list

Remarks

If Param2 is equal to NULL, all items will be deleted from the list.

Example

// *** delete first two list items ***
struct FarListDelete FLDItem;
FLDItem.StartIndex=0;
FLDItem.Count=2;
Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)&FLDItem);

// *** clear all list ***
  //   Method 1:
  struct FarListDelete FLDItem={0,0};
  Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)&FLDItem);

  //   Method 2:
  Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)NULL);
See also: