FarListItemData

Far Manager

FarListItemData

The FarListItemData structure describes the data that will be associated with an item in a DI_LISTBOX or DI_COMBOBOX list.
struct FarListItemData
{
  int   Index;
  int   DataSize;
  void *Data;
  DWORD Reserved;
};

Members

Index
Index of the list item to which the data is associated.
DataSize
Size of Data or 0 if a null-terminated string is being associated with the item.
Data
Pointer to the data.
Reserved
Reserved.

Remarks

Dialog manager allocates memory for the data associated with the list item using the following rules:
DataSizeData
0 Pointer to a null-terminated string. Memory area of strlen(Data)+1 bytes is alocated. The data is then copied to the allocated space.
<= sizeof(DWORD) Character array of 4 or less elements or any pointer (HWND window handle, for example). No memory is allocated. Data is placed in the local area of the list item.
> sizeof(DWORD) Arbitrary data. Memory area of DataSize bytes is allocated. The data is then copied to the allocated space.
See also: