|
XContextHelp sample demonstrates how to add HTML context help to your application and use "Context help" feature for dialog boxes. The information on this web page is also available within help file of the project. First, in the dialog editor, you should check "Help ID" for every control you want to assign context help to. When you save the resource, you will get an additional file called "resource.hm". Next, create a text file under any name you like (it's popups.txt in the sample project) and add your popup texts into it in the format: .topic HIDC_COOL1 It's a very cool item, ain't it? You can create as many text files as you like, for example, a good schema is to use one file per dialog. Then, create a blank project in HTML Help Workshop, click on "HTML Help API info" and browse for your text file(s) using "Text File..." button. Unfortunately, you will have to save a copy of original file resource.hm with .h extension, as it appears that .hm is not recognized by HH workshop. Then, save the project (.hhp) and compile it; you get a YourApp.chm file as result. Finally, you have to "link" the contents of .chm file with your code. You should define a DLG_HELP callback for your dialog (you have to use XFT 1.0 RC6 or later) and in it, you should fill in T_HH_POPUP structure as described in XContextHelp.f90 file. Call HtmlHelp API with ppropriate arguments and there you are. Note that you have to link against htmlhelp.lib and USE HTMLHELPM. The sample also demonstrates how to call "ordinary" help pages using HH_CONTEXT_HELP argument for HtmlHelp API. If you want to work with symbolic identifiers rather than names of HTML files, you have to define two additional header files, named as you like. "Map" file should contain mapping symbolic name:value, while "Alias" file contains mapping symbolic name:path to html file. The map file should be also translated to Fortran and INCLUDEd into your code to provide access to help page identifiers. See also this Knowledge Base article » for more information.
Download XContextHelp Project (dependent on Xeffort Full Installation)
|