In the process of developing applications, in order to better facilitate users to familiarize themselves with the functions and usage of this software, we can use the help documentation of CHM. So, how to better integrate CHM documents into your application? The author talks about a simple and convenient method for reference.
You can find the hhctrl.ocx file in the system directory of Win9.x (or the system32 directory of Win2000). Although this file is ActiveX, it can also be used as a DLL dynamic link library, but it must be available after IE4.0 supply. By analyzing the hhctrl.ocx file, we can see that it provides a HtmlHelpA function to call the CHM file.
First, in the implementation, make the following statement:
function HtmlHelpA(hwndCaller: THandle; pazFile: String;
uCommand, dwData: DWord): DWord; stdcall external 'hhctrl.ocx';
Then you can use it, for example:
HtmlHelpA (handle, 'c/winnt/help/access.chm', 0, 0);
It's very simple, give it a try, you will definitely be able to do it, add this simple and easy function to your program!