2004-04-22 05:45:00 +02:00
|
|
|
/*
|
|
|
|
* hhctrl implementation
|
|
|
|
*
|
|
|
|
* Copyright 2004 Krzysztof Foltman
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
2004-06-01 21:44:59 +02:00
|
|
|
#include "winnls.h"
|
2004-04-22 05:45:00 +02:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "wine/debug.h"
|
2004-09-16 21:05:49 +02:00
|
|
|
#include "htmlhelp.h"
|
2004-04-22 05:45:00 +02:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
|
|
|
|
|
2004-06-01 21:44:59 +02:00
|
|
|
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
|
2004-04-22 05:45:00 +02:00
|
|
|
{
|
2004-06-01 21:44:59 +02:00
|
|
|
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 */
|
2004-09-16 21:05:49 +02:00
|
|
|
if (command == HH_DISPLAY_TOPIC)
|
2004-06-01 21:44:59 +02:00
|
|
|
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;
|
2004-04-22 05:45:00 +02:00
|
|
|
}
|
|
|
|
|
2004-06-01 21:44:59 +02:00
|
|
|
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data)
|
2004-04-22 05:45:00 +02:00
|
|
|
{
|
2004-06-01 21:44:59 +02:00
|
|
|
WCHAR *wfile = NULL;
|
|
|
|
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
|
|
|
|
HWND result;
|
|
|
|
|
2004-06-30 20:17:07 +02:00
|
|
|
wfile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR));
|
2004-06-01 21:44:59 +02:00
|
|
|
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
|
|
|
|
|
|
|
|
result = HtmlHelpW( caller, wfile, command, data );
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, wfile );
|
|
|
|
return result;
|
2004-04-22 05:45:00 +02:00
|
|
|
}
|