DN_HELP

Far Manager

DN_HELP

The DN_HELP event is sent to the dialog callback function before a help topic is displayed.

Param1

ID of the dialog item that has the keyboard focus.

Param2

Pointer to a string containing the name of a help topic that the dialog callback function wants to display.

Return

Pointer to a string containing the name of a help topic that the dialog callback function should display. If NULL is returned, no help topic will be displayed.

Controls

ControlDescription
All All elements that can receive keyboard focus.

Remarks

This event allows to control which help topic will be displayed based on the current dialog item.

Example

// based on the state of the game select which help topic to display
// in this case the current dialog item is if no matter to us
case DN_HELP:
{
  static char *HelpTopics[3]={"Contents","Rule","Recommendations"};
  int i=1;
  if(GAME[0].NumPl1==2 && GAME[0].NumPl2 == 2)
    i=0;
  else if(GAME[0].NumPl1+GAME[0].NumPl2 > 16)
    i=2;
  return (LONG_PTR)(&HelpTopics[i][0]);
}
See also: