Commit 4cf842e7 authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

hhctrl.ocx: When called as a program, quit when HtmlHelp call fails.

parent f1b7bb4e
......@@ -349,6 +349,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
int len, buflen, mapid = -1;
WCHAR *filename;
char *endq = NULL;
HWND hwnd;
hh_process = TRUE;
......@@ -404,12 +405,18 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
/* Open a specific help topic */
if(mapid != -1)
HtmlHelpW(GetDesktopWindow(), filename, HH_HELP_CONTEXT, mapid);
hwnd = HtmlHelpW(GetDesktopWindow(), filename, HH_HELP_CONTEXT, mapid);
else
HtmlHelpW(GetDesktopWindow(), filename, HH_DISPLAY_TOPIC, 0);
hwnd = HtmlHelpW(GetDesktopWindow(), filename, HH_DISPLAY_TOPIC, 0);
heap_free(filename);
if (!hwnd)
{
ERR("Failed to open HTML Help file '%s'.\n", szCmdLine);
return 0;
}
while (GetMessageW(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment