[This function is available through Windows XP and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.]
Displays a help window that corresponds to the current UI language setting.
HWND MLHtmlHelp( _In_ HWND hwndCaller, _In_ LPCTSTR pszFile, _In_ UINT uCommand, _In_ DWORD_PTR dwData, _In_ DWORD dwCrossCodePage );
- hwndCaller [in]
A handle to the parent window that calls this function.
- pszFile [in]
A pointer to a buffer that contains the fully qualified path of a compiled help (.chm) file, or a topic file within a specified help file.
- uCommand [in]
The command to complete. This function directly supports only HH_DISPLAY_TOPIC and HH_DISPLAY_TEXT_POPUP. In the case of any other command, the call is forwarded without the dwCrossCodePage value to HtmlHelp.
- dwData [in]
Any data that may be required, based on the value of the uCommand parameter.
- dwCrossCodePage [in]
The DWORD value indicating the code page of the current UI language setting, such as CP_ACP.
Depending on the specified uCommand and the result, MLHtmlHelp returns one or both of the following:
- The handle (hwnd) of the help window.
- NULL. In some cases, NULL indicates failure; in other cases, NULL indicates that the help window has not yet been created.
If a problem arises with the path of the help file for the current language, the call is forwarded to HtmlHelp for standard handling.
When the help window is closed, focus returns to the owner unless the owner is the desktop. If hwndCaller is the desktop, then the operating system determines where focus is returned.
In addition, if MLHtmlHelp sends any notification messages from the help window, the messages are sent to hwndCaller as long as you have enabled notification message tracking in the help window definition.
The following example calls the HH_DISPLAY_TOPIC command to open the help file named Help.chm and display its default topic in the help window named
Mainwin. Generally, the help window specified in this command is a standard HTML Help Viewer.
HWND hwnd = HtmlHelp(GetDesktopWindow(), "c:\\Help.chm::/Intro.htm>Mainwin", HH_DISPLAY_TOPIC, NULL, CP_ACP);
Note When using this function, set the stack size of the hosting executable to at least 100k. If the defined stack size is too small, then the thread created to run HTML Help will also be created with this stack size, and the operation could fail. Optionally, you can remove /STACK from the link command line, and also remove any STACK setting in the executable's DEF file (default stack size is 1MB in this case). You can also set the stack size using the /Fnumber compiler command (the compiler will pass this to the linker as /STACK).
Minimum supported client
|Windows 2000 Professional, Windows XP [desktop apps only]|
Minimum supported server
|Windows Server 2003 [desktop apps only]|
Unicode and ANSI names
|MLHtmlHelpW (Unicode) and MLHtmlHelpA (ANSI)|
Build date: 11/16/2013