DN_KEY

Far Manager

DN_KEY

The DN_KEY event is sent to the dialog callback function after the user presses a key in the dialog.

Param1

The ID of the dialog item receiving the event (usually it is the item that has the keyboard focus).

Param2

Return

TRUE - the key was processed internally.
FALSE - the key should be processed by the internal handler of the Dialog API kernel.

Remarks

By default the DN_KEY event is not sent for an open DI_COMBOBOX. Use the DM_SETCOMBOBOXEVENT message to enable the sending of DN_KEY events.

Example

Example of processing the event:
// Center the dialog if the user has pressed Ctrl-Apps
case DN_KEY:
  if(Param2 == KEY_CTRLAPPS)
  {
    COORD c={-1,-1};
    Info.SendDlgMessage(hDlg,DM_MOVEDIALOG,TRUE,(LONG_PTR)&c);
    return TRUE;
  }
See also: