# Macros and types

### Types

Type | Description
--- | ---
FARWINDOWPROC | Dialog window callback function.

### Macros

Macro | Description
--- | ---
Dlg_GetDlgData(Info,hDlg) | Retrieve the 32-bit data value associated with the dialog (DM_GETDLGDATA).
Dlg_GetDlgItemData(Info,hDlg,ID) | Retrieve the 32-bit data value associated with a dialog item (DM_GETITEMDATA).
Dlg_RedrawDialog(Info,hDlg) | Redraw the entire dialog window (DM_REDRAW).
Dlg_SetDlgData(Info,hDlg,Data) | Set the 32-bit data value associated with the dialog (DM_SETDLGDATA).
Dlg_SetDlgItemData(Info,hDlg,ID,Data) | Set the 32-bit data value associated with a dialog item (DM_SETITEMDATA).
DlgEdit_AddHistory(Info,hDlg,ID,Str) | Add an item to the history of an input line (DM_ADDHISTORY).
DlgItem_Disable(Info,hDlg,ID) | Disable dialog item (DM_ENABLE).
DlgItem_Enable(Info,hDlg,ID) | Enable dialog item (DM_ENABLE).
DlgItem_GetCheck(Info,hDlg,ID) | Retrieve the state of DI_CHECKBOX and DI_RADIOBUTTON dialog items (DM_GETCHECK).
DlgItem_GetFocus(Info,hDlg) | Retrieve the ID of the dialog item that has the keyboard focus (DM_GETFOCUS).
DlgItem_IsEnable(Info,hDlg,ID) | Check if a dialog item is disabled (DM_ENABLE).
DlgItem_SetCheck(Info,hDlg,ID,State) | Set the state of DI_CHECKBOX and DI_RADIOBUTTON dialog items to one of three allowed states (DM_SETCHECK).
DlgItem_SetFocus(Info,hDlg,ID) | Set keyboard focus to the given dialog item (DM_SETFOCUS).
DlgItem_SetText(Info,hDlg,ID,Str) | Set new string value for an input line or new caption for an item (DM_SETTEXTPTR).
DlgList_AddString(Info,hDlg,ID,Str) | Add a string to a DI_COMBOBOX or DI_LISTBOX list (DM_LISTADDSTR).
DlgList_ClearList(Info,hDlg,ID) | Clear a DI_COMBOBOX or DI_LISTBOX list (DM_LISTDELETE).
DlgList_DeleteItem(Info,hDlg,ID,Index) | Delete an item from a DI_COMBOBOX or DI_LISTBOX list (DM_LISTDELETE).
DlgList_GetCurPos(Info,hDlg,ID) | Retrieve the current cursor position in a DI_COMBOBOX or DI_LISTBOX list (DM_LISTGETCURPOS).
DlgList_GetItemData(Info,hDlg,ID,Index) | Retrieve data associated with an item in a DI_COMBOBOX or DI_LISTBOX list (DM_LISTGETDATA).
DlgList_SetCurPos(Info,hDlg,ID,NewPos) | Set new cursor position in a DI_COMBOBOX or DI_LISTBOX list (DM_LISTSETCURPOS).
DlgList_SetItemStrAsData(Info,hDlg,ID,Index,Str) | Associate a string with an item of a DI_COMBOBOX or DI_LISTBOX list (DM_LISTSETDATA).
DlgList_SortDown(Info,hDlg,ID) | Sort the items of a DI_COMBOBOX or DI_LISTBOX list in descending order (DM_LISTSORT).
DlgList_SortUp(Info,hDlg,ID) | Sort the items of a DI_COMBOBOX or DI_LISTBOX list in ascending order (DM_LISTSORT).

Here:
Info
Reference to the PluginStartupInfo structure.
hDlg
Dialog handle.
ID
The index of the dialog item in the FarDialogItem structure.
Data
32-bit value (numeric value of DWORD type or a pointer).
Str
Null-terminated string.
State
Item state (one of the BSTATE_* constants, described here DM_SETCHECK).
Index
Position in a list.
NewPos
New position in a list.
See also:
Types and definitions