As explained in Chapter 14, “Help Macros,” you can use the RegisterRoutine macro to register any DLL function as a Windows Help macro. You might want to create a DLL whose sole purpose is to provide new Windows Help macros for your Help authors. This section will show you how to do that.
Examples in this section use the sample source code in the DLLDEMO.C file. DLLDEMO.C contains a HelloWorld function, which plays a beep on the speaker.
The examples also refer to a small Windows Help file called DLLDEMO.HLP, along with the DLLDEMO.RTF source file and DLLDEMO.HPJ Help project File used to build it. HelloWorld is registered as a Help macro in DLLDEMO.HPJ, and the following hot spot in the DLLDEMO.HLP Help file executes HelloWorld to play a beep.
Call HelloWorld.!HelloWorld(hwndapp,qchPath)
Note:
To debug your DLL or observe any of the operations described in this section, you can compile DLLDEMO for the CodeView for Windows symbolic debugger and load the DLL into CodeView while you view the sample title. See the DLLDEMO.C file for specific instructions.