From 17d5e07ec6e4bdcdd47cbb86e6025366ac05c987 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 1 Jun 2004 19:44:59 +0000 Subject: [PATCH] Display more informative message when HtmlHelp stub is invoked, add A/W conversion code, remove useless (and wrong) hungarian notation from function prototypes. --- dlls/hhctrl.ocx/Makefile.in | 2 +- dlls/hhctrl.ocx/hhctrl.c | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/dlls/hhctrl.ocx/Makefile.in b/dlls/hhctrl.ocx/Makefile.in index 2a22bd224d8..ce8fe3b5989 100644 --- a/dlls/hhctrl.ocx/Makefile.in +++ b/dlls/hhctrl.ocx/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = hhctrl.ocx -IMPORTS = shell32 +IMPORTS = shell32 user32 kernel32 C_SRCS = hhctrl.c diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 50dceec2ae1..98aadfaade1 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -23,21 +23,35 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" +#include "winnls.h" #include "winuser.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); -HWND WINAPI HtmlHelpA(HWND hwndCaller, LPCSTR pszFile, - UINT uCommand, DWORD dwData) +HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data) { - FIXME("stub\n"); - return 0; + FIXME("(%p, %s, %d, %ld): stub\n", caller, debugstr_w(filename), command, data); + + /* if command is HH_DISPLAY_TOPIC just display an informative message for now */ + if (command == 0) + MessageBoxA( NULL, "HTML Help functionality is currently unimplemented.\n\n" + "Try installing Internet Explorer, or using a native hhctrl.ocx with the Mozilla ActiveX control.", + "Wine", MB_OK | MB_ICONEXCLAMATION ); + return 0; } -HWND WINAPI HtmlHelpW(HWND hwndCaller, LPCWSTR pszFile, - UINT uCommand, DWORD dwData) +HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data) { - FIXME("stub\n"); - return 0; + WCHAR *wfile = NULL; + DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 ); + HWND result; + + wfile = HeapAlloc( GetProcessHeap(), 0, len ); + MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len ); + + result = HtmlHelpW( caller, wfile, command, data ); + + HeapFree( GetProcessHeap(), 0, wfile ); + return result; } -- 2.11.4.GIT