The following code segment creates a general help dialog (as a child of parent) using the convenience function. The dialog is left unmanaged--presumably it is managed elsewhere in the application when a help request is made.
Widget mainHelpDialog, moreButton, helpButton; ac = 0; XtSetArg (al[ac], XmNtitle, "My Application - Help"); ac++; XtSetArg (al[ac], DtNhelpVolume, "My Help Volume"); ac++; XtSetArg (al[ac], DtNlocationId, "Getting Started"); ac++; XtSetArg (al[ac], DtNhelpType, "DtHELP_TYPE_TOPIC"); ac++; mainHelpDialog = DtCreateHelpDialog (parent, "mainHelpDialog", al, ac);
The following two calls add the hyperlink and close callbacks to the dialog. Presumably, the functions HyperlinkCB() and CloseHelpCB() are declared elsewhere in the application.
XtAddCallback (mainHelpDialog, DtNhyperLinkCallback, HyperlinkCB, (XtPointer)NULL); XtAddCallback (mainHelpDialog, DtNcloseCallback, CloseHelpCB, (XtPointer)NULL);