mirror of
https://github.com/fadden/ciderpress.git
synced 2024-12-22 20:29:51 +00:00
250d1043e3
The original version of CiderPress used a WinHelp help file, built with an application called HelpMatic Pro. This app used a proprietary format, and had no facility for exporting to "raw" HPJ + RTF files, so I decompiled the HLP and imported it into HelpScribble. Using HelpScribble, I cleaned up the help file formatting a little, fixed up the table of contents, and exported as "raw" HtmlHelp (HHP, HHK, HHC, and a whole bunch of HTML). I also split the pop-up help text, which isn't supported by HelpScribble, into a separate text file that Microsoft's HTML Help Workshop understands. I'm checking in the files that HTML Help Workshop needs to generate a CHM, so anyone can update the help text. I'm also checking in the CHM file, rather than adding the help workshop to the build, so that it's not necessary to download and configure the help workshop to build CiderPress. This change adds all of the updated help, but only updates the Help and question mark button actions for one specific dialog. A subsequent change will update the rest of the dialogs. This change is essentially upgrading us from a totally obsolete help system to a nearly-obsolete help system, but the systems are similar enough to make this a useful half-step on the way to something else. The code will centralize help activation in a pair of functions in the main app class, so any future improvements should be more limited in scope. This also adds a build step to copy the CHM to the execution directory.
71 lines
1.7 KiB
C++
71 lines
1.7 KiB
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
/*
|
|
* The application object.
|
|
*/
|
|
#ifndef APP_MYAPP_H
|
|
#define APP_MYAPP_H
|
|
|
|
#include "Registry.h"
|
|
|
|
/* CiderPress version numbers */
|
|
#define kAppMajorVersion 4
|
|
#define kAppMinorVersion 0
|
|
#define kAppBugVersion 0
|
|
#define kAppDevString L"d1"
|
|
|
|
/*
|
|
* Windows application object.
|
|
*/
|
|
class MyApp: public CWinApp
|
|
{
|
|
public:
|
|
MyApp(LPCTSTR lpszAppName = NULL);
|
|
virtual ~MyApp(void);
|
|
|
|
MyRegistry fRegistry;
|
|
|
|
const WCHAR* GetExeFileName(void) const { return fExeFileName; }
|
|
const WCHAR* GetExeBaseName(void) const { return fExeBaseName; }
|
|
|
|
/*
|
|
* Handles pop-up help requests. Call this from OnHelpInfo.
|
|
*/
|
|
static BOOL HandleHelpInfo(HELPINFO* lpHelpInfo);
|
|
|
|
/*
|
|
* Handles help topic requests. Call this from OnHelp.
|
|
*/
|
|
static void HandleHelp(CWnd* pWnd, DWORD topicId);
|
|
|
|
private:
|
|
virtual BOOL InitInstance(void) override;
|
|
virtual BOOL OnIdle(LONG lCount) override;
|
|
|
|
/*
|
|
* Show where we got something from. Handy for checking DLL load locations.
|
|
*
|
|
* If "name" is NULL, we show the EXE info.
|
|
*/
|
|
void LogModuleLocation(const WCHAR* name);
|
|
|
|
/*
|
|
* This holds pairs of control IDs and popup help IDs, for use by
|
|
* HtmlHelp HH_TP_HELP_WM_HELP.
|
|
*
|
|
* The control and help ID values are identical just to make life
|
|
* simpler, but we need a table anyway.
|
|
*/
|
|
static const DWORD PopUpHelpIds[];
|
|
|
|
CString fExeFileName;
|
|
CString fExeBaseName;
|
|
};
|
|
|
|
extern MyApp gMyApp;
|
|
|
|
#endif /*APP_MYAPP_H*/
|