ReactOS 0.4.15-dev-7931-gfd331f1
htmlhelp.c
Go to the documentation of this file.
1/*
2 * ReactOS Calc (HtmlHelp support)
3 *
4 * Copyright 2007-2017, Carlo Bramini
5 *
6 * This program 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "calc.h"
22
23#define GET_CB(name) \
24 calc_##name = (type_##name)GetProcAddress(hHtmlHelp, #name); \
25 if (calc_##name == NULL) calc_##name = dummy_##name;
26
27static HWND WINAPI
28dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData);
29
30static HWND WINAPI
31dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData);
32
35
37
38static HWND WINAPI
40{
41 return NULL;
42}
43
44static HWND WINAPI
46{
47 return NULL;
48}
49
51{
52 hHtmlHelp = LoadLibrary(_T("HHCTRL.OCX"));
53 if (hHtmlHelp == NULL)
54 return;
55
58}
59
60void HtmlHelp_Stop(void)
61{
62 if(hHtmlHelp == NULL)
63 return;
64
67}
HWND hWnd
Definition: settings.c:17
HWND(WINAPI * type_HtmlHelpA)(HWND, LPCSTR, UINT, DWORD)
Definition: calc.h:52
HWND(WINAPI * type_HtmlHelpW)(HWND, LPCWSTR, UINT, DWORD)
Definition: calc.h:53
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define FreeLibrary(x)
Definition: compat.h:748
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data)
Definition: hhctrl.c:157
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data)
Definition: hhctrl.c:421
static HWND WINAPI dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData)
Definition: htmlhelp.c:39
void HtmlHelp_Stop(void)
Definition: htmlhelp.c:60
static HWND WINAPI dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData)
Definition: htmlhelp.c:45
void HtmlHelp_Start(HINSTANCE hInstance)
Definition: htmlhelp.c:50
static HMODULE hHtmlHelp
Definition: htmlhelp.c:36
type_HtmlHelpA calc_HtmlHelpA
Definition: htmlhelp.c:33
#define GET_CB(name)
Definition: htmlhelp.c:23
type_HtmlHelpW calc_HtmlHelpW
Definition: htmlhelp.c:34
static HANDLE ULONG_PTR dwData
Definition: file.c:35
unsigned int UINT
Definition: ndis.h:50
#define _T(x)
Definition: vfdio.h:22
#define LoadLibrary
Definition: winbase.h:3862
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185