Erich Hoover : hhctrl.ocx: Default to the correct tab for different HH_DISPLAY_* values.
Alexandre Julliard
julliard at winehq.org
Wed Sep 28 14:45:46 CDT 2011
Module: wine
Branch: master
Commit: 973237996b6d4573b2469b5c4951bb31a239fd8a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=973237996b6d4573b2469b5c4951bb31a239fd8a
Author: Erich Hoover <ehoover at mines.edu>
Date: Tue Sep 27 20:01:38 2011 -0600
hhctrl.ocx: Default to the correct tab for different HH_DISPLAY_* values.
---
dlls/hhctrl.ocx/hhctrl.c | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 02d3b7d..2747dcb 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -159,12 +159,13 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
{
case HH_DISPLAY_TOPIC:
case HH_DISPLAY_TOC:
+ case HH_DISPLAY_INDEX:
case HH_DISPLAY_SEARCH:{
HHInfo *info;
BOOL res;
+ NMHDR nmhdr;
const WCHAR *index = NULL;
-
- FIXME("Not all HH cases handled correctly\n");
+ int tab_index = TAB_CONTENTS;
if (!filename)
return NULL;
@@ -192,6 +193,32 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
ReleaseHelpViewer(info);
return NULL;
}
+
+ switch(command)
+ {
+ case HH_DISPLAY_TOPIC:
+ case HH_DISPLAY_TOC:
+ tab_index = TAB_CONTENTS;
+ if (data)
+ FIXME("Should jump to topic '%s'.\n", debugstr_w((WCHAR *)data));
+ break;
+ case HH_DISPLAY_INDEX:
+ tab_index = TAB_INDEX;
+ if (data)
+ FIXME("Should select keyword '%s'.\n", debugstr_w((WCHAR *)data));
+ break;
+ case HH_DISPLAY_SEARCH:
+ tab_index = TAB_SEARCH;
+ if (data)
+ FIXME("Should display search specified by HH_FTS_QUERY structure.\n");
+ break;
+ }
+ /* open the requested tab */
+ memset(&nmhdr, 0, sizeof(nmhdr));
+ nmhdr.code = TCN_SELCHANGE;
+ SendMessageW(info->hwndTabCtrl, TCM_SETCURSEL, (WPARAM)info->tabs[tab_index].id, 0);
+ SendMessageW(info->WinType.hwndNavigation, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+
return info->WinType.hwndHelp;
}
case HH_HELP_CONTEXT: {
More information about the wine-cvs
mailing list