ReactOS  0.4.14-dev-599-g2d4d3f5
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 
27 static HWND WINAPI
28 dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData);
29 
30 static HWND WINAPI
31 dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData);
32 
35 
37 
38 static HWND WINAPI
40 {
41  return NULL;
42 }
43 
44 static HWND WINAPI
46 {
47  return NULL;
48 }
49 
51 {
52  hHtmlHelp = LoadLibrary(_T("HHCTRL.OCX"));
53  if (hHtmlHelp == NULL)
54  return;
55 
58 }
59 
60 void HtmlHelp_Stop(void)
61 {
62  if(hHtmlHelp == NULL)
63  return;
64 
66  hHtmlHelp = NULL;
67 }
#define GET_CB(name)
Definition: htmlhelp.c:23
void HtmlHelp_Stop(void)
Definition: htmlhelp.c:60
#define LoadLibrary
Definition: winbase.h:3696
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
void HtmlHelp_Start(HINSTANCE hInstance)
Definition: htmlhelp.c:50
HWND hWnd
Definition: settings.c:17
static HANDLE ULONG_PTR dwData
Definition: file.c:35
static HWND WINAPI dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData)
Definition: htmlhelp.c:39
HINSTANCE hInstance
Definition: charmap.c:20
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data)
Definition: hhctrl.c:157
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
static HMODULE hHtmlHelp
Definition: htmlhelp.c:36
#define _T(x)
Definition: vfdio.h:22
#define FreeLibrary(x)
Definition: compat.h:413
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
type_HtmlHelpA calc_HtmlHelpA
Definition: htmlhelp.c:33
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data)
Definition: hhctrl.c:421
type_HtmlHelpW calc_HtmlHelpW
Definition: htmlhelp.c:34
unsigned int UINT
Definition: ndis.h:50
static HWND WINAPI dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData)
Definition: htmlhelp.c:45
HWND(WINAPI * type_HtmlHelpA)(HWND, LPCSTR, UINT, DWORD)
Definition: calc.h:52
HWND(WINAPI * type_HtmlHelpW)(HWND, LPCWSTR, UINT, DWORD)
Definition: calc.h:53