Share via


HH_INITIALIZE command

This command initializes the help system for use and must be the first HTML Help command called. It returns a cookie which must be used in the HH_UNINITIALIZE call.

HH_INITIALIZE configures HTML Help to run on the same thread as the calling application instead of a secondary thread by setting the global property HH_GPROPID_SINGLETHREAD to VARIANT_TRUE. Running HTML Help on the same thread as the calling application requires the calling application to send messages to HTML Help by calling the HH_PRETRANSLATEMESSAGE command.

pszFile dwData
Must be NULL. Specifies a pointer to a DWORD. This call returns a cookie that you must pass as the value of dwData when you call HH_UNINITIALIZE.

Example

DWORD dwCookie = NULL;
HtmlHelp(
         NULL,
         NULL,
         HH_INITIALIZE,
         (DWORD_PTR)&m_dwCookie) ; // Cookie returned by Hhctrl.ocx.

Remarks

  • Call HH_INITIALIZE before calling any other command and call HH_UNINITIALIZE only when your application ends. You should call these commands once during the life of your application.

About Commands

HH_PRETRANSLATEMESSAGE

HH_UNINITIALIZE