Link it to libhelp, libhtmlw, libButtFace, libXpm and the Motif and X11 libraries needed on your system (e.g -lhelp -lhtmlw -lButtFace -lXpm -lXm -lXt -lXmu -lX11 -lXext ...).#include <Xm/Xm.h> #include <help.h> int main (int argc, char* argv[]) { XtAppContext app_context; Widget toplevel; char resource_class[] = "Xmhelp"; char* help_file = "libhelp-index.html"; /* here we set libhelp resources */ help_set_resource (help_class_name, (XtPointer) resource_class); help_set_resource (help_standalone, (XtPointer) True); help_set_resource (help_index, help_file); toplevel = XtVaAppInitialize (&app_context, resource_class, NULL, 0, &argc, argv, NULL, NULL); /* here we request the help document */ get_help (toplevel, help_file, NULL); XtRealizeWidget (toplevel); XtAppMainLoop (app_context); }
Finally, add X-resources to the Xmhelp app-defaults file to set the default size and your favorite background (or include fallback resources).
*Background: #bfbfbfbfbfbf *help*geometry: 580x560-0-0