Display more informative message when HtmlHelp stub is invoked, add

A/W conversion code, remove useless (and wrong) hungarian notation
from function prototypes.
oldstable
Mike Hearn 2004-06-01 19:44:59 +00:00 committed by Alexandre Julliard
parent f10b38811a
commit 17d5e07ec6
2 changed files with 23 additions and 9 deletions

View File

@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = hhctrl.ocx
IMPORTS = shell32
IMPORTS = shell32 user32 kernel32
C_SRCS = hhctrl.c

View File

@ -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;
}