Online help (original) in the CHM format in VC (original)

xiaoxiao2021-03-06  51

In VC development, when we create new application projects, if the context-sensitive helper (the default is not selected) in the fourth page, the application will generate an HLP after the application is established. table of Contents. By default, the system's help file is WinHelp format. The suffix is ​​* .hlp. There is a resource index file, which is * .hm. This is index information for application resources that can be sensitive to the corresponding context. There is also Microsoft Help File Production Tools WinHelp. The suffix is ​​* .hpj. Since the help of the current * .hlp format is a bit outdated, the Help file in the CHM format has become mainstream. This article gives the author's main steps of the actual experience process.

The steps to change the HLP format to CHM help are as follows:

1. The first is to install a tool called HTML HELP WORKSHOP.

2. Use this tool to generate a help file that suffix * .hhp.

3. Newly built a VC header file * .h, copy all content in * .hm. Plus "#define" before all resource definitions. Note that there is only one space between #define and the rest of the resource number! Otherwise, sensitive help will be invalid!

4. Form all HTML files all help information.

5. All HTML files must be placed in the HTML subdirectory in the same class directory of the * .hp file, otherwise compiling an error.

6. Open the * .hhhp file, in the Project property page, establish a mapping for each context resource number and the corresponding HTML file. That is, click the HTMLHELP API Information tool to create a mapping relationship. You can also use the text method to open * .hh after manual writing.

7. Enter a directory structure of the help file in the Contents Properties page, you can establish a connection to the HTML file for each node.

8. Enter the query entry in the Index Properties page, each entry can also be connected to the HTML file.

9. Save and compile it, you can generate * .chm files

10. In the WinHelp response processing of the app's app file, use the HTMLHELP function to call * .chm file.

11. In the application system, when the cursor stays in an object (dialog or menu item), pressing F1 to pop up the help information of the object directly.

转载请注明原文地址:https://www.9cbs.com/read-79575.html

New Post(0)