Andrey Turkin : hhctrl.ocx:
Recognize and use topic specification in url or in data.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 3 08:57:11 CDT 2007
Module: wine
Branch: master
Commit: 8ecd3465d9ee23d1be04ea3ce5d010f51500df90
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ecd3465d9ee23d1be04ea3ce5d010f51500df90
Author: Andrey Turkin <andrey.turkin at gmail.com>
Date: Wed May 2 20:16:59 2007 +0400
hhctrl.ocx: Recognize and use topic specification in url or in data.
---
dlls/hhctrl.ocx/hhctrl.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 958edf9..b687a83 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -100,16 +100,34 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
case HH_DISPLAY_TOPIC:
case HH_DISPLAY_TOC:
case HH_DISPLAY_SEARCH:{
+ static const WCHAR delimW[] = {':',':',0};
HHInfo *info;
BOOL res;
+ WCHAR chm_file[MAX_PATH];
+ const WCHAR *index;
FIXME("Not all HH cases handled correctly\n");
+ index = strstrW(filename, delimW);
+ if (index)
+ {
+ memcpy(chm_file, filename, (index-filename)*sizeof(WCHAR));
+ chm_file[index-filename] = 0;
+ filename = chm_file;
+ }
+ else
+ {
+ if (command!=HH_DISPLAY_SEARCH) /* FIXME - use HH_FTS_QUERYW structure in data */
+ index = (const WCHAR*)data;
+ }
+
info = CreateHelpViewer(filename);
if (info)
{
- res = NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszFile);
+ if (!index)
+ index = info->WinType.pszFile;
+ res = NavigateToChm(info, info->pCHMInfo->szFile, index);
if(!res)
ReleaseHelpViewer(info);
}
More information about the wine-cvs
mailing list