Writing a help processing procedure

All Dexterity applications that integrate with Microsoft Dynamics GP each must have separate help processing procedures. The help processing procedure ascertains what kind of help the user wants, then issues the appropriate commands to display that help.

The runtime engine automatically calls the appropriate help processing procedure, depending on whether the user chooses a third-party or main application item:

[spacer]

Form type

Item

Processing procedure

Microsoft Dynamics GP form

Microsoft Dynamics GP window fields

Microsoft Dynamics GP

Microsoft Dynamics GP window

Microsoft Dynamics GP

Third-party window fields

Third-party

New local fields

Third-party

Additional third-party window and all associated window fields.

Third-party

Third-party form

Third-party window fields

Third-party

Microsoft Dynamics GP window fields

Third-party

Third-party windows

Third-party


The following script is the help processing procedure for the sample integrating application:

{--------------------------------------------------------------
Script name: IG_Help_Processing
Description: Processes online help for the sample application.
 --------------------------------------------------------------}
local integer help_type, result;
local long context_number;
local string help_path_and_file;

{Return the location of the current dictionary.}
help_path_and_file = Dict_GetPathname(2);

{Set the complete path to the help file.}
help_path_and_file = help_path_and_file + "DEVELOP.CHM";

{Get the help type for the current situation.}
help_type = WinHelp_GetHelpType();

case help_type 
	in [HELP_TYPE_WHATS_THIS_MODE, HELP_TYPE_HELP_KEY, HELP_TYPE_WHATS_THIS_WIN]
		{Get the context number for the current window.}
		context_number = WinHelp_GetWindowContextNumber();
		{Call the help engine, displaying the help for the window.}
		result = WinHelp_InvokeHelp(help_path_and_file, HELP_CMD_CONTEXT, context_number);
	in [HELP_TYPE_DIALOG_HELP]
		{Process the help for modal dialogs.}
		{Get the context number for the item chosen.}
		context_number = WinHelp_GetFieldContextNumber();
		{Call the help engine, displaying help for the modal dialog.}
		result = WinHelp_InvokeHelp(help_path_and_file, HELP_CMD_CONTEXT, context_number);
	in [HELP_TYPE_CONTENTS]
		{Invoke the Contents topic.}
		result = WinHelp_InvokeHelp(help_path_and_file, HELP_CMD_CONTENTS, 0);
	in [HELP_TYPE_SEARCH]
		{Invoke the search engine.}
		result = WinHelp_Search(help_path_and_file, "");
	else
		{Invoke the Contents topic.}
		result = WinHelp_InvokeHelp(help_path_and_file, HELP_CMD_CONTENTS, 0);
end case;


Documentation Feedback