Article ID: 194116 - Last Review: March 16, 2005 - Revision: 1.1 INFO: HTML Help Embedded Windows - Issues and WorkaroundsThis article was previously published under Q194116 On This PageSUMMARY
Embedded Help windows provide a way to integrate Help with a Windows
application. If you plan to implement embedded Help windows using the HTML
Help executable (Hh.exe) program, these are the issues you need to know
about:
MORE INFORMATIONLimitations of Embedded WindowsEmbedded windows are a simple solution to a difficult problem. To begin with, embedded Help is not truly embedded--it is parented. Embedding Help in your Windows application involves parenting a Help window to a window in your application, making the Help window a child of that application window. The only way to control this window is through the Win32 API. Under normal circumstances, this does not present a problem because you write the code for both the parent window and the child window. Unfortunately, in the case of embedded Help, the Help window is based on code written in HTML Help, which means that a Help window is the frame window for Hh.exe. A Help window is not designed to be a child window.If you only need to show some contextual Help information, the performance of embedded Help should be acceptable. However, if you need to do more extensive customization, there are some problems with using embedded Help. The main limitations are as follows:
Running Hhctrl.ocx in Single-Threaded ModeHhctrl.ocx runs in a second thread, so that it can handle the keyboard. This causes instability when you use Hhctrl.ocx in an embedded Help scenario. The best solution is to turn off the secondary thread and have your Windows application pump messages. If you are planning to implement embedded Help, you should upgrade to HTML Help 1.2, which supports message pumping through the HTML Help API.Setting the control to become single threaded involves calling two API commands: 1) call HH_INITIALIZE at startup, and 2) call HH_UNINITIALIZE at shutdown. Pumping messages consists of calling the HTML Help API HH_PRETRANSLATEMESSAGE command and passing it the MSG structure from your GetMessage call in your message loop. For example: Code example: HH_INITIALIZE
REFERENCES
HTML Help Workshop: HTML Help API
APPLIES TO
| Article Translations
|


Back to the top
