Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * hhctrl implementation |
| 3 | * |
| 4 | * Copyright 2004 Krzysztof Foltman |
| 5 | * |
| 6 | * This library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public |
| 8 | * License as published by the Free Software Foundation; either |
| 9 | * version 2.1 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with this library; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | |
| 21 | #include <stdarg.h> |
| 22 | #include <string.h> |
| 23 | #include "windef.h" |
| 24 | #include "winbase.h" |
| 25 | #include "wingdi.h" |
Mike Hearn | 17d5e07 | 2004-06-01 19:44:59 +0000 | [diff] [blame^] | 26 | #include "winnls.h" |
Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 27 | #include "winuser.h" |
| 28 | #include "wine/debug.h" |
| 29 | |
| 30 | WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); |
| 31 | |
Mike Hearn | 17d5e07 | 2004-06-01 19:44:59 +0000 | [diff] [blame^] | 32 | HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data) |
Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 33 | { |
Mike Hearn | 17d5e07 | 2004-06-01 19:44:59 +0000 | [diff] [blame^] | 34 | FIXME("(%p, %s, %d, %ld): stub\n", caller, debugstr_w(filename), command, data); |
| 35 | |
| 36 | /* if command is HH_DISPLAY_TOPIC just display an informative message for now */ |
| 37 | if (command == 0) |
| 38 | MessageBoxA( NULL, "HTML Help functionality is currently unimplemented.\n\n" |
| 39 | "Try installing Internet Explorer, or using a native hhctrl.ocx with the Mozilla ActiveX control.", |
| 40 | "Wine", MB_OK | MB_ICONEXCLAMATION ); |
| 41 | return 0; |
Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 42 | } |
| 43 | |
Mike Hearn | 17d5e07 | 2004-06-01 19:44:59 +0000 | [diff] [blame^] | 44 | HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data) |
Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 45 | { |
Mike Hearn | 17d5e07 | 2004-06-01 19:44:59 +0000 | [diff] [blame^] | 46 | WCHAR *wfile = NULL; |
| 47 | DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 ); |
| 48 | HWND result; |
| 49 | |
| 50 | wfile = HeapAlloc( GetProcessHeap(), 0, len ); |
| 51 | MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len ); |
| 52 | |
| 53 | result = HtmlHelpW( caller, wfile, command, data ); |
| 54 | |
| 55 | HeapFree( GetProcessHeap(), 0, wfile ); |
| 56 | return result; |
Krzysztof Foltman | 9bca690 | 2004-04-22 03:45:00 +0000 | [diff] [blame] | 57 | } |