HH_PRETRANSLATEMESSAGE command
This command is called in the message loop of your Windows application to ensure proper handling of Windows messages, especially keyboard messages when running HTML Help single thread.
The HTML Help API is not thread safe and must be called from one and only one thread in a process.
pszFile | dwData |
---|---|
Must be NULL. | Points to a Win32 MSG structure. |
Example
MSG msg;
while (GetMessage (&msg;, NULL, 0, 0)) //Retrieve a message from the
{ //calling thread's message queue
if (!HtmlHelp (
NULL,
NULL,
HH_PRETRANSLATEMESSAGE,
&msg;))
{
TranslateMessage (&msg;);
DispatchMessage (&msg;);
}
}
Return value
- True, if message is translated.
- False, if command fails.
Comments
- The MSG structure contains message information from a thread's message queue.
- Before calling this command, you must first set the global property HH_GPROPID_SINGLETHREAD to
VARIANT_TRUE
by calling the HH_INITIALIZE command.
See also
![]() |
About commands |