The ID of the dialog item for which the history item is added.
Pointer to a NULL-terminated string to be added to the history.
For example, in a calculator pressing Enter computes an expression. To save the entered expression
to history after Enter was pressed it is necessary to get that string and add it to history:
FarDialogItem dialog[] = {
...
{ DI_EDIT, 10, 3, 49, 0, 1, (int)"foo_history", DIF_HISTORY|DIF_MANUALADDHISTORY, 0, "" },
...
};
LONG_PTR WINAPI FooDlgProc(HANDLE hDlg, int Msg, int Param1, LONG_PTR Param2)
{
...
if (Msg == DM_KEY && Param2 == KEY_ENTER){
Info.SendDlgMessage(hDlg, DM_GETTEXTPTR, 2, (LONG_PTR)Text);
Info.SendDlgMessage(hDlg, DM_ADDHISTORY, 2, (LONG_PTR)Text);
Res = AData.Parse(Text);
...
}