mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 08:16:34 +00:00
[CALC] Add support for HTML-Help. CORE-15019
This commit is contained in:
parent
ec1b499aac
commit
f6c565bc22
4 changed files with 94 additions and 4 deletions
67
base/applications/calc/htmlhelp.c
Normal file
67
base/applications/calc/htmlhelp.c
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* ReactOS Calc (HtmlHelp support)
|
||||
*
|
||||
* Copyright 2007-2017, Carlo Bramini
|
||||
*
|
||||
* This program 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "calc.h"
|
||||
|
||||
#define GET_CB(name) \
|
||||
calc_##name = (type_##name)GetProcAddress(hHtmlHelp, #name); \
|
||||
if (calc_##name == NULL) calc_##name = dummy_##name;
|
||||
|
||||
static HWND WINAPI
|
||||
dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData);
|
||||
|
||||
static HWND WINAPI
|
||||
dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData);
|
||||
|
||||
type_HtmlHelpA calc_HtmlHelpA = dummy_HtmlHelpA;
|
||||
type_HtmlHelpW calc_HtmlHelpW = dummy_HtmlHelpW;
|
||||
|
||||
static HMODULE hHtmlHelp;
|
||||
|
||||
static HWND WINAPI
|
||||
dummy_HtmlHelpA(HWND hWnd, LPCSTR pszFile, UINT uCommand, DWORD dwData)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static HWND WINAPI
|
||||
dummy_HtmlHelpW(HWND hWnd, LPCWSTR pszFile, UINT uCommand, DWORD dwData)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void HtmlHelp_Start(HINSTANCE hInstance)
|
||||
{
|
||||
hHtmlHelp = LoadLibrary(_T("HTMLHELP"));
|
||||
if (hHtmlHelp == NULL)
|
||||
return;
|
||||
|
||||
GET_CB(HtmlHelpW)
|
||||
GET_CB(HtmlHelpA)
|
||||
}
|
||||
|
||||
void HtmlHelp_Stop(void)
|
||||
{
|
||||
if(hHtmlHelp == NULL)
|
||||
return;
|
||||
|
||||
FreeLibrary(hHtmlHelp);
|
||||
hHtmlHelp = NULL;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue