Erich Hoover : hhctrl.ocx: Add support for specifying window names with HH_HELP_CONTEXT.
Alexandre Julliard
julliard at winehq.org
Thu Oct 4 13:38:36 CDT 2012
Module: wine
Branch: master
Commit: 317f26beefbb7f916a29cde25f7e254b4e10007c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=317f26beefbb7f916a29cde25f7e254b4e10007c
Author: Erich Hoover <ehoover at mines.edu>
Date: Wed Oct 3 09:22:11 2012 -0600
hhctrl.ocx: Add support for specifying window names with HH_HELP_CONTEXT.
---
dlls/hhctrl.ocx/hhctrl.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 2814ab2..3fd7df5 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -244,21 +244,33 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
return info->WinType.hwndHelp;
}
case HH_HELP_CONTEXT: {
- HHInfo *info;
+ WCHAR *window = NULL;
+ HHInfo *info = NULL;
LPWSTR url;
if (!filename)
return NULL;
- if (!resolve_filename(filename, fullname, MAX_PATH, NULL, NULL))
+ if (!resolve_filename(filename, fullname, MAX_PATH, NULL, &window))
{
WARN("can't find %s\n", debugstr_w(filename));
return 0;
}
- info = CreateHelpViewer(NULL, fullname, caller);
+ if (window)
+ info = find_window(window);
+
+ info = CreateHelpViewer(info, fullname, caller);
if(!info)
+ {
+ heap_free(window);
return NULL;
+ }
+
+ if(!info->WinType.pszType)
+ info->WinType.pszType = info->stringsW.pszType = window;
+ else
+ heap_free(window);
url = FindContextAlias(info->pCHMInfo, data);
if(!url)
More information about the wine-cvs
mailing list