Display more informative message when HtmlHelp stub is invoked, add
A/W conversion code, remove useless (and wrong) hungarian notation
from function prototypes.
diff --git a/dlls/hhctrl.ocx/Makefile.in b/dlls/hhctrl.ocx/Makefile.in
index 2a22bd2..ce8fe3b 100644
--- a/dlls/hhctrl.ocx/Makefile.in
+++ b/dlls/hhctrl.ocx/Makefile.in
@@ -3,7 +3,7 @@
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 50dceec..98aadfa 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;
}