Commit 3545dc51 authored by Kirill K. Smirnov's avatar Kirill K. Smirnov Committed by Alexandre Julliard

winhelp: Use path of parent helpfile while looking for popup window.

parent 133477c2
......@@ -117,8 +117,25 @@ HLPFILE* WINHELP_LookupHelpFile(LPCSTR lpszFile)
{
HLPFILE* hlpfile;
char szFullName[MAX_PATH];
char szAddPath[MAX_PATH];
char *p;
/*
* NOTE: This is needed by popup windows only.
* In other cases it's not needed but does not hurt though.
*/
if (Globals.active_win && Globals.active_win->page && Globals.active_win->page->file)
{
strcpy(szAddPath, Globals.active_win->page->file->lpszPath);
p = strrchr(szAddPath, '\\');
if (p) *p = 0;
}
if (!SearchPath(NULL, lpszFile, ".hlp", MAX_PATH, szFullName, NULL))
/*
* FIXME: Should we swap conditions?
*/
if (!SearchPath(NULL, lpszFile, ".hlp", MAX_PATH, szFullName, NULL) &&
!SearchPath(szAddPath, lpszFile, ".hlp", MAX_PATH, szFullName, NULL))
{
if (WINHELP_MessageBoxIDS_s(STID_FILE_NOT_FOUND_s, lpszFile, STID_WHERROR,
MB_YESNO|MB_ICONQUESTION) != IDYES)
......
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