2 * hhctrl implementation
4 * Copyright 2004 Krzysztof Foltman
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.
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.
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
28 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp
);
33 static const char *command_to_string(UINT command
)
35 #define X(x) case x: return #x
38 X( HH_DISPLAY_TOPIC
);
40 X( HH_DISPLAY_INDEX
);
41 X( HH_DISPLAY_SEARCH
);
44 X( HH_GET_WIN_HANDLE
);
45 X( HH_ENUM_INFO_TYPE
);
46 X( HH_SET_INFO_TYPE
);
51 X( HH_KEYWORD_LOOKUP
);
52 X( HH_DISPLAY_TEXT_POPUP
);
54 X( HH_TP_HELP_CONTEXTMENU
);
55 X( HH_TP_HELP_WM_HELP
);
58 X( HH_GET_LAST_ERROR
);
59 X( HH_ENUM_CATEGORY
);
60 X( HH_ENUM_CATEGORY_IT
);
61 X( HH_RESET_IT_FILTER
);
62 X( HH_SET_INCLUSIVE_FILTER
);
63 X( HH_SET_EXCLUSIVE_FILTER
);
66 X( HH_PRETRANSLATEMESSAGE
);
67 X( HH_SET_GLOBAL_PROPERTY
);
68 default: return "???";
73 HWND WINAPI
HtmlHelpW(HWND caller
, LPCWSTR filename
, UINT command
, DWORD data
)
75 FIXME("(%p, %s, command=%s, data=%ld): stub\n",
76 caller
, debugstr_w( filename
),
77 command_to_string( command
), data
);
81 case HH_DISPLAY_TOPIC
:
83 case HH_DISPLAY_SEARCH
:
85 MessageBoxA( NULL
, "HTML Help functionality is currently unimplemented.\n\n"
86 "Try installing Internet Explorer, or using a native hhctrl.ocx with the Mozilla ActiveX control.",
87 "Wine", MB_OK
| MB_ICONEXCLAMATION
);
93 HWND WINAPI
HtmlHelpA(HWND caller
, LPCSTR filename
, UINT command
, DWORD data
)
100 DWORD len
= MultiByteToWideChar( CP_ACP
, 0, filename
, -1, NULL
, 0 );
102 wfile
= HeapAlloc( GetProcessHeap(), 0, (len
+1) * sizeof(WCHAR
));
103 MultiByteToWideChar( CP_ACP
, 0, filename
, -1, wfile
, len
);
106 result
= HtmlHelpW( caller
, wfile
, command
, data
);
108 HeapFree( GetProcessHeap(), 0, wfile
);