WinHelp to HtmlHelp conversion, part 2

This updates the various dialogs to use the new functions.  The help
system should be fully functional now.
This commit is contained in:
Andy McFadden 2014-12-09 14:10:52 -08:00
parent 1a26be65e7
commit 759f0d820f
61 changed files with 184 additions and 414 deletions

View File

@ -9,7 +9,6 @@
#include "stdafx.h"
#include "AboutDialog.h"
#include "EnterRegDialog.h"
#include "HelpTopics.h"
#include "MyApp.h"
#include "resource.h"
#include "../nufxlib/NufxLib.h"
@ -174,10 +173,9 @@ void AboutDialog::ShowRegistrationInfo(void)
}
#endif
void AboutDialog::OnAboutCredits(void)
{
WinHelp(HELP_TOPIC_CREDITS, HELP_CONTEXT /*HELP_CONTEXTPOPUP*/);
MyApp::HandleHelp(this, HELP_TOPIC_CREDITS);
}
#if 0

View File

@ -10,7 +10,6 @@
BEGIN_MESSAGE_MAP(AddClashDialog, CDialog)
ON_BN_CLICKED(IDC_CLASH_RENAME, OnRename)
ON_BN_CLICKED(IDC_CLASH_SKIP, OnSkip)
//ON_WM_HELPINFO()
END_MESSAGE_MAP()
/*

View File

@ -6,7 +6,6 @@
#include "stdafx.h"
#include "AddFilesDialog.h"
#include "FileNameConv.h"
#include "HelpTopics.h"
#include "resource.h"
@ -130,9 +129,5 @@ bool AddFilesDialog::ValidateStoragePrefix(void)
void AddFilesDialog::HandleHelp()
{
LOGD("AddFilesDialog HandleHelp");
CWnd* pWndMain = ::AfxGetMainWnd();
CWinApp* pAppMain = ::AfxGetApp();
::WinHelp(pWndMain->m_hWnd, pAppMain->m_pszHelpFilePath,
HELP_CONTEXT, HELP_TOPIC_ADD_FILES_DLG);
MyApp::HandleHelp(this, HELP_TOPIC_ADD_FILES_DLG);
}

View File

@ -7,7 +7,6 @@
* Implementation of the various ArchiveInfo dialog classes.
*/
#include "StdAfx.h"
#include "HelpTopics.h"
#include "ArchiveInfoDialog.h"
#include "../nufxlib/NufxLib.h"
@ -21,11 +20,6 @@ BEGIN_MESSAGE_MAP(ArchiveInfoDialog, CDialog)
ON_COMMAND(IDHELP, OnHelp)
END_MESSAGE_MAP()
void ArchiveInfoDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_ARCHIVE_INFO, HELP_CONTEXT);
}
/*
* ===========================================================================

View File

@ -31,7 +31,9 @@ private:
/*
* Show general help for the archive info dialogs.
*/
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_ARCHIVE_INFO);
}
DECLARE_MESSAGE_MAP()
};

View File

@ -13,7 +13,6 @@
#include "StdAfx.h"
#include "../reformat/BASIC.h"
#include "BasicImport.h"
#include "HelpTopics.h"
/*
* ==========================================================================
@ -652,8 +651,3 @@ bail:
}
return;
}
void ImportBASDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_IMPORT_BASIC, HELP_CONTEXT);
}

View File

@ -74,7 +74,9 @@ private:
//virtual void DoDataExchange(CDataExchange* pDX);
virtual void OnOK(void) override;
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_IMPORT_BASIC);
}
/*
* Import an Applesoft BASIC program from the specified file.

View File

@ -9,7 +9,6 @@
#include "StdAfx.h"
#include "CassetteDialog.h"
#include "CassImpTargetDialog.h"
#include "HelpTopics.h"
#include "GenericArchive.h"
#include "Main.h"
#include "../diskimg/DiskImg.h" // need kStorageSeedling
@ -387,11 +386,6 @@ void CassetteDialog::OnAlgorithmChange(void)
AnalyzeWAV();
}
void CassetteDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_IMPORT_CASSETTE, HELP_CONTEXT);
}
void CassetteDialog::OnImport(void)
{
/*

View File

@ -48,7 +48,9 @@ private:
afx_msg void OnImport(void);
afx_msg void OnListDblClick(NMHDR* pNotifyStruct, LRESULT* pResult);
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_IMPORT_CASSETTE);
}
/*
* This holds converted data from the WAV file, plus some meta-data

View File

@ -8,7 +8,6 @@
*/
#include "StdAfx.h"
#include "ChooseAddTargetDialog.h"
#include "HelpTopics.h"
#include "DiskFSTree.h"
using namespace DiskImgLib;
@ -84,8 +83,3 @@ void ChooseAddTargetDialog::DoDataExchange(CDataExchange* pDX)
fpChosenSubdir = pTargetData->pFile;
}
}
void ChooseAddTargetDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_CHOOSE_TARGET, HELP_CONTEXT);
}

View File

@ -43,7 +43,9 @@ private:
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_CHOOSE_TARGET);
}
DiskFSTree fDiskFSTree;

View File

@ -7,7 +7,6 @@
#include "ChooseDirDialog.h"
#include "NewFolderDialog.h"
#include "DiskFSTree.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(ChooseDirDialog, CDialog)
ON_NOTIFY(TVN_SELCHANGED, IDC_CHOOSEDIR_TREE, OnSelChanged)
@ -71,18 +70,6 @@ BOOL ChooseDirDialog::PreTranslateMessage(MSG* pMsg)
return CDialog::PreTranslateMessage(pMsg);
}
BOOL ChooseDirDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
DWORD context = lpHelpInfo->iCtrlId;
WinHelp(context, HELP_CONTEXTPOPUP);
return TRUE; // indicate success??
}
void ChooseDirDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_CHOOSE_FOLDER, HELP_CONTEXT);
}
void ChooseDirDialog::OnSelChanged(NMHDR* pnmh, LRESULT* pResult)
{
CString path;

View File

@ -16,6 +16,8 @@
* Choose a directory. This is distinctly different from what the standard
* "Open" and "Save As" dialogs do, because those want to choose normal files
* only, while this wants to select a folder.
*
* TODO: Vista-style dialogs support folder selection.
*/
class ChooseDirDialog : public CDialog {
public:
@ -43,10 +45,6 @@ protected:
*/
afx_msg void OnSelChanged(NMHDR* pnmh, LRESULT* pResult);
// F1 key hit, or '?' button in title bar used to select help for an
// item in the dialog. For ON_WM_HELPINFO.
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
// User pressed "Expand Tree" button.
afx_msg void OnExpandTree(void);
@ -54,7 +52,15 @@ protected:
afx_msg void OnNewFolder(void);
// User pressed "Help" button.
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_CHOOSE_FOLDER);
}
// F1 key hit, or '?' button in title bar used to select help for an
// item in the dialog. For ON_WM_HELPINFO.
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
private:
CString fPathName;

View File

@ -50,12 +50,6 @@ void RenameOverwriteDialog::DoDataExchange(CDataExchange* pDX)
}
}
BOOL RenameOverwriteDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
/*
* ==========================================================================
@ -105,12 +99,6 @@ BOOL ConfirmOverwriteDialog::OnInitDialog(void)
return CDialog::OnInitDialog();
}
BOOL ConfirmOverwriteDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void ConfirmOverwriteDialog::OnYes(void)
{
fResultOverwrite = true;

View File

@ -54,7 +54,9 @@ private:
afx_msg void OnRename(void);
// Handle a click on the question-mark button.
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
DECLARE_MESSAGE_MAP()
};
@ -87,7 +89,9 @@ private:
virtual BOOL OnInitDialog(void) override;
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
DECLARE_MESSAGE_MAP()
};

View File

@ -14,7 +14,6 @@
BEGIN_MESSAGE_MAP(ConvDiskOptionsDialog, CDialog)
ON_WM_HELPINFO()
//ON_COMMAND(IDHELP, OnHelp)
ON_BN_CLICKED(IDC_CONVDISK_COMPUTE, OnCompute)
ON_BN_CLICKED(IDC_USE_SELECTED, ResetSizeControls)
ON_BN_CLICKED(IDC_USE_ALL, ResetSizeControls)

View File

@ -9,7 +9,6 @@
#include "stdafx.h"
#include "CreateImageDialog.h"
#include "NewDiskSize.h"
#include "HelpTopics.h"
#include "../diskimg/DiskImgDetail.h" // need ProDOS filename validator
BEGIN_MESSAGE_MAP(CreateImageDialog, CDialog)
@ -295,14 +294,3 @@ bool CreateImageDialog::IsValidVolumeName_HFS(const WCHAR* name)
CStringA nameStr(name);
return DiskImgLib::DiskFSHFS::IsValidVolumeName(nameStr);
}
BOOL CreateImageDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void CreateImageDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_IMAGE_CREATOR, HELP_CONTEXT);
}

View File

@ -70,10 +70,14 @@ private:
afx_msg void OnSizeChangeRange(UINT nID);
// Context help (question mark).
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
// Dialog help ("help" button).
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_IMAGE_CREATOR);
}
bool IsValidVolumeName_DOS(const WCHAR* name);
bool IsValidVolumeName_ProDOS(const WCHAR* name);

View File

@ -62,9 +62,3 @@ fail:
pDX->Fail();
return;
}
BOOL CreateSubdirDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -36,7 +36,9 @@ protected:
virtual void DoDataExchange(CDataExchange* pDX) override;
// Context help request (question mark button).
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
private:

View File

@ -43,9 +43,3 @@ void DEFileDialog::OnChange(void)
ASSERT(pWnd != NULL);
pWnd->EnableWindow(!str.IsEmpty());
}
BOOL DEFileDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -21,6 +21,7 @@
#include "resource.h"
#include "../diskimg/DiskImg.h"
using namespace DiskImgLib;
@ -61,7 +62,9 @@ protected:
*/
afx_msg virtual void OnChange(void);
afx_msg virtual BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
private:
DiskFS* fpDiskFS;

View File

@ -21,7 +21,6 @@
#include "stdafx.h"
#include "SubVolumeDialog.h"
#include "DEFileDialog.h"
#include "HelpTopics.h"
#include "DiskEditDialog.h"
@ -231,34 +230,6 @@ BOOL DiskEditDialog::PreTranslateMessage(MSG* pMsg)
return CDialog::PreTranslateMessage(pMsg);
}
BOOL DiskEditDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
LOGI("HELP: size=%d contextType=%d ctrlID=0x%x contextID=0x%08lx",
lpHelpInfo->cbSize, lpHelpInfo->iContextType, lpHelpInfo->iCtrlId,
lpHelpInfo->dwContextId);
DWORD context = lpHelpInfo->iCtrlId;
/* map all of the track/sector selection stuff to one item */
if (context == IDC_DISKEDIT_TRACK ||
context == IDC_DISKEDIT_TRACKSPIN ||
context == IDC_STEXT_TRACK ||
context == IDC_DISKEDIT_SECTOR ||
context == IDC_DISKEDIT_SECTORSPIN ||
context == IDC_STEXT_SECTOR)
{
context = IDC_DISKEDIT_TRACK;
}
WinHelp(context, HELP_CONTEXTPOPUP);
return TRUE; // indicate success??
}
void DiskEditDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_DISKEDIT, HELP_CONTEXT);
}
void DiskEditDialog::OnDone(void)
{
LOGI("DiskEditDialog OnDone");

View File

@ -115,8 +115,12 @@ protected:
*/
afx_msg virtual void OnNibbleParms(void);
afx_msg virtual void OnHelp(void);
afx_msg virtual BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_DISKEDIT);
}
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
/*
* Change the mode of a spin button. The Windows control doesn't

View File

@ -6,7 +6,6 @@
#include "StdAfx.h"
#include "DiskFSTree.h"
#include "ChooseAddTargetDialog.h"
#include "HelpTopics.h"
using namespace DiskImgLib;

View File

@ -11,7 +11,6 @@
*/
#include "StdAfx.h"
#include "EOLScanDialog.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(EOLScanDialog, CDialog)
ON_COMMAND(IDHELP, OnHelp)
@ -44,8 +43,3 @@ BOOL EOLScanDialog::OnInitDialog(void)
return CDialog::OnInitDialog();
}
void EOLScanDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_EOL_SCAN, HELP_CONTEXT);
}

View File

@ -30,7 +30,9 @@ public:
private:
BOOL OnInitDialog(void) override;
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_EOL_SCAN);
}
DECLARE_MESSAGE_MAP()
};

View File

@ -7,7 +7,6 @@
#include "EditAssocDialog.h"
#include "MyApp.h"
#include "Registry.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(EditAssocDialog, CDialog)
ON_WM_HELPINFO()
@ -119,13 +118,3 @@ void EditAssocDialog::DoDataExchange(CDataExchange* pDX)
}
}
}
BOOL EditAssocDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
return ShowContextHelp(this, lpHelpInfo);
}
void EditAssocDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_EDIT_ASSOC, HELP_CONTEXT);
}

View File

@ -33,8 +33,12 @@ protected:
virtual BOOL OnInitDialog(void) override;
void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_EDIT_ASSOC);
}
/*
* Load the list view control.

View File

@ -8,7 +8,6 @@
*/
#include "stdafx.h"
#include "EditCommentDialog.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(EditCommentDialog, CDialog)
ON_BN_CLICKED(IDC_COMMENT_DELETE, OnDelete)
@ -48,14 +47,3 @@ void EditCommentDialog::OnDelete(void)
EndDialog(kDeleteCommentID);
}
BOOL EditCommentDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void EditCommentDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_EDIT_COMMENT, HELP_CONTEXT);
}

View File

@ -34,8 +34,12 @@ protected:
virtual BOOL OnInitDialog(void) override;
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_EDIT_COMMENT);
}
/*
* User wants to delete the comment. Verify first.

View File

@ -6,7 +6,6 @@
#include "StdAfx.h"
#include "EditPropsDialog.h"
#include "FileNameConv.h"
#include "HelpTopics.h"
using namespace DiskImgLib;
@ -460,14 +459,3 @@ long EditPropsDialog::GetAuxType(void)
}
return val;
}
BOOL EditPropsDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void EditPropsDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_EDIT_PROPS, HELP_CONTEXT);
}

View File

@ -68,8 +68,13 @@ private:
* Called when something is typed in one of the HFS type boxes.
*/
afx_msg void OnHFSTypeChange(void);
afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_EDIT_PROPS);
}
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
/*
* For "simple" access formats, i.e. DOS 3.2/3.3, the "write" button acts

View File

@ -5,7 +5,6 @@
*/
#include "stdafx.h"
#include "ExtractOptionsDialog.h"
#include "HelpTopics.h"
#include "ChooseDirDialog.h"
BEGIN_MESSAGE_MAP(ExtractOptionsDialog, CDialog)
@ -163,14 +162,3 @@ void ExtractOptionsDialog::OnChooseFolder(void)
pEditWnd->SetWindowText(ccp);
}
}
BOOL ExtractOptionsDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void ExtractOptionsDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_EXT_OPTIONS, HELP_CONTEXT);
}

View File

@ -11,6 +11,7 @@
#include "../util/UtilLib.h"
#include "resource.h"
#include "HelpTopics.h"
/*
* Our somewhat complicated extraction options dialog.
@ -93,10 +94,14 @@ private:
afx_msg void OnChooseFolder(void);
// Context help request (question mark button).
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
// User pressed the "Help" button.
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_EXT_OPTIONS);
}
MyBitmapButton fChooseFolderButton;
int fSelectedCount;

View File

@ -5,7 +5,6 @@
*/
#include "stdafx.h"
#include "ImageFormatDialog.h"
#include "HelpTopics.h"
#include "../diskimg/DiskImg.h"
@ -303,14 +302,3 @@ void ImageFormatDialog::OnOK(void)
CDialog::OnOK();
}
BOOL ImageFormatDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp(lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // indicate success??
}
void ImageFormatDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_DISK_IMAGES, HELP_CONTEXT);
}

View File

@ -66,8 +66,12 @@ protected:
*/
void OnOK(void) override;
afx_msg virtual void OnHelp(void);
afx_msg virtual BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_DISK_IMAGES);
}
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
struct ConvTable;

View File

@ -19,7 +19,6 @@
#include "EnterRegDialog.h"
#include "OpenVolumeDialog.h"
#include "Print.h"
#include "HelpTopics.h"
#include "../util/UtilLib.h"
#include "resource.h"
@ -182,8 +181,6 @@ BEGIN_MESSAGE_MAP(MainWindow, CFrameWnd)
ON_COMMAND( IDM_HELP_ABOUT, OnHelpAbout)
// ON_COMMAND( IDM_RTCLK_DEFAULT, OnRtClkDefault)
/* this is required to allow "Help" button to work in PropertySheets (!) */
// ON_COMMAND(ID_HELP, OnHelp)
ON_COMMAND(ID_HELP_FINDER, CFrameWnd::OnHelpFinder)
ON_COMMAND(ID_HELP, CFrameWnd::OnHelp)
ON_COMMAND(ID_CONTEXT_HELP, CFrameWnd::OnContextHelp)
@ -253,9 +250,10 @@ MainWindow::~MainWindow()
//LOGI("MainWindow destructor");
CloseArchiveWOControls();
int cc;
cc = ::WinHelp(m_hWnd, ::AfxGetApp()->m_pszHelpFilePath, HELP_QUIT, 0);
LOGI("Turning off WinHelp returned %d", cc);
//int cc;
//cc = ::WinHelp(m_hWnd, ::AfxGetApp()->m_pszHelpFilePath, HELP_QUIT, 0);
//LOGI("Turning off WinHelp returned %d", cc);
::HtmlHelp(NULL, NULL, HH_CLOSE_ALL, 0);
// free stuff used by print dialog
::GlobalFree(fhDevMode);
@ -723,27 +721,11 @@ void MainWindow::OnSetFocus(CWnd* /*pOldWnd*/)
BOOL MainWindow::OnHelpInfo(HELPINFO* /*lpHelpInfo*/)
{
WinHelp(HELP_TOPIC_WELCOME, HELP_CONTEXT);
LOGD("MainWindow::OnHelpInfo");
MyApp::HandleHelp(this, HELP_TOPIC_WELCOME);
return TRUE;
}
#if 0
/*
* Catch-all Help handler, necessary to allow CPropertySheet to display a
* "Help" button. (WTF?)
*/
LONG MainWindow::OnHelp(UINT wParam, LONG lParam)
{
HELPINFO* lpHelpInfo = (HELPINFO*) lParam;
DWORD context = lpHelpInfo->iCtrlId;
LOGI("MainWindow OnHelp (context=%d)", context);
WinHelp(context, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
#endif
void MainWindow::OnEditPreferences(void)
{
// Handle Edit->Preferences by popping up a property sheet.
@ -1042,7 +1024,8 @@ void MainWindow::OnUpdateEditSort(CCmdUI* pCmdUI)
void MainWindow::OnHelpContents(void)
{
WinHelp(0, HELP_FINDER);
MyApp::HandleHelp(this, HELP_TOPIC_WELCOME);
//WinHelp(0, HELP_FINDER);
}
void MainWindow::OnHelpWebSite(void)
@ -1068,7 +1051,9 @@ void MainWindow::OnHelpWebSite(void)
void MainWindow::OnHelpOrdering(void)
{
// How to order... ka-ching!
WinHelp(HELP_TOPIC_ORDERING_INFO, HELP_CONTEXT);
// TODO: no longer used?
LOGW("OnHelpOrdering -- not implemented");
//WinHelp(HELP_TOPIC_ORDERING_INFO, HELP_CONTEXT);
}
void MainWindow::OnHelpAbout(void)

View File

@ -231,15 +231,15 @@ BOOL MyApp::OnIdle(LONG lCount)
IDC_DISKEDIT_DOREAD, IDH_DISKEDIT_DOREAD,
IDC_DISKEDIT_DOWRITE, IDH_DISKEDIT_DOWRITE,
IDC_DISKEDIT_TRACK, IDH_DISKEDIT_TRACK,
IDC_DISKEDIT_TRACKSPIN, IDH_DISKEDIT_TRACKSPIN,
IDC_DISKEDIT_SECTOR, IDH_DISKEDIT_SECTOR,
IDC_DISKEDIT_SECTORSPIN, IDH_DISKEDIT_SECTORSPIN,
IDC_DISKEDIT_TRACKSPIN, IDH_DISKEDIT_TRACK, // remapped
IDC_DISKEDIT_SECTOR, IDH_DISKEDIT_TRACK, // remapped
IDC_DISKEDIT_SECTORSPIN, IDH_DISKEDIT_TRACK, // remapped
IDC_DISKEDIT_OPENFILE, IDH_DISKEDIT_OPENFILE,
IDC_DISKEDIT_EDIT, IDH_DISKEDIT_EDIT,
IDC_DISKEDIT_PREV, IDH_DISKEDIT_PREV,
IDC_DISKEDIT_NEXT, IDH_DISKEDIT_NEXT,
IDC_STEXT_SECTOR, IDH_STEXT_SECTOR,
IDC_STEXT_TRACK, IDH_STEXT_TRACK,
IDC_STEXT_SECTOR, IDH_DISKEDIT_TRACK, // remapped
IDC_STEXT_TRACK, IDH_DISKEDIT_TRACK, // remapped
IDC_DISKEDIT_DONE, IDH_DISKEDIT_DONE,
IDC_DISKEDIT_HEX, IDH_DISKEDIT_HEX,
IDC_DISKEDIT_SUBVOLUME, IDH_DISKEDIT_SUBVOLUME,
@ -523,8 +523,11 @@ BOOL MyApp::OnIdle(LONG lCount)
/*static*/ void MyApp::HandleHelp(CWnd* pWnd, DWORD topicId)
{
// The CWnd#HtmlHelp() function is insisting on using the top-level
// parent, but if we do that with the Add Files custom file dialog
// then the help window pops up behind the app rather than in front.
CWnd* pParent = pWnd->GetTopLevelParent();
LOGD("HandleHelp ID=%lu parent=%p", topicId, pParent);
::HtmlHelp(pParent->m_hWnd, gMyApp.m_pszHelpFilePath,
LOGD("HandleHelp ID=%lu pWnd=%p parent=%p", topicId, pWnd, pParent);
::HtmlHelp(pWnd->m_hWnd, gMyApp.m_pszHelpFilePath,
HH_HELP_CONTEXT, topicId);
}

View File

@ -66,9 +66,3 @@ void NewFolderDialog::DoDataExchange(CDataExchange* pDX)
}
}
}
BOOL NewFolderDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -40,7 +40,9 @@ public:
protected:
void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
// on exit, set to "true" if we created the folder in "fNewFolder"
bool fFolderCreated;

View File

@ -8,7 +8,6 @@
*/
#include "stdafx.h"
#include "OpenVolumeDialog.h"
#include "HelpTopics.h"
#include "Main.h"
#include "../diskimg/Win32Extra.h" // need disk geometry calls
#include "../diskimg/ASPI.h"
@ -667,11 +666,6 @@ void OpenVolumeDialog::OnOK(void)
}
}
void OpenVolumeDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_OPEN_VOLUME, HELP_CONTEXT);
}
void OpenVolumeDialog::ForceReadOnly(bool readOnly) const
{
CButton* pButton = (CButton*) GetDlgItem(IDC_OPENVOL_READONLY);

View File

@ -47,7 +47,10 @@ protected:
*/
afx_msg void OnVolumeFilterSelChange(void);
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_OPEN_VOLUME);
}
afx_msg void OnListDblClick(NMHDR* pNotifyStruct, LRESULT* pResult);
// 0 is default; numbers must match up with pop-up menu order

View File

@ -9,7 +9,6 @@
#include "EditAssocDialog.h"
#include "Main.h"
#include "NufxArchive.h"
#include "HelpTopics.h"
#include "resource.h"
#include <afxpriv.h> // need WM_COMMANDHELP
@ -31,7 +30,7 @@ BEGIN_MESSAGE_MAP(PrefsGeneralPage, CPropertyPage)
ON_BN_CLICKED(IDC_PREF_SUCCESS_BEEP, OnChange)
ON_BN_CLICKED(IDC_COL_DEFAULTS, OnDefaults)
ON_BN_CLICKED(IDC_PREF_ASSOCIATIONS, OnAssociations)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp)
END_MESSAGE_MAP()
@ -125,18 +124,6 @@ void PrefsGeneralPage::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_PREF_SUCCESS_BEEP, fBeepOnSuccess);
}
LONG PrefsGeneralPage::OnHelp(UINT wParam, LONG lParam)
{
WinHelp((DWORD) ((HELPINFO*) lParam)->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
LONG PrefsGeneralPage::OnCommandHelp(UINT, LONG)
{
WinHelp(HELP_TOPIC_PREFS_GENERAL, HELP_CONTEXT);
return 0; // doesn't matter
}
/*
* ===========================================================================
@ -150,7 +137,7 @@ BEGIN_MESSAGE_MAP(PrefsDiskImagePage, CPropertyPage)
ON_BN_CLICKED(IDC_PDISK_OPENVOL_PHYS0, OnChange)
ON_BN_CLICKED(IDC_PDISK_PRODOS_ALLOWLOWER, OnChange)
ON_BN_CLICKED(IDC_PDISK_PRODOS_USESPARSE, OnChange)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp)
END_MESSAGE_MAP()
@ -183,18 +170,6 @@ void PrefsDiskImagePage::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_PDISK_PRODOS_USESPARSE, fProDOSUseSparse);
}
LONG PrefsDiskImagePage::OnHelp(UINT wParam, LONG lParam)
{
WinHelp((DWORD) ((HELPINFO*) lParam)->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
LONG PrefsDiskImagePage::OnCommandHelp(UINT, LONG)
{
WinHelp(HELP_TOPIC_PREFS_DISK_IMAGE, HELP_CONTEXT);
return 0; // doesn't matter
}
/*
* ===========================================================================
@ -204,7 +179,7 @@ LONG PrefsDiskImagePage::OnCommandHelp(UINT, LONG)
BEGIN_MESSAGE_MAP(PrefsCompressionPage, CPropertyPage)
ON_CONTROL_RANGE(BN_CLICKED, IDC_DEFC_UNCOMPRESSED, IDC_DEFC_BZIP2, OnChangeRange)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp)
END_MESSAGE_MAP()
@ -280,18 +255,6 @@ void PrefsCompressionPage::DoDataExchange(CDataExchange* pDX)
DDX_Radio(pDX, IDC_DEFC_UNCOMPRESSED, fCompressType);
}
LONG PrefsCompressionPage::OnHelp(UINT wParam, LONG lParam)
{
WinHelp((DWORD) ((HELPINFO*) lParam)->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
LONG PrefsCompressionPage::OnCommandHelp(UINT, LONG)
{
WinHelp(HELP_TOPIC_PREFS_COMPRESSION, HELP_CONTEXT);
return 0; // doesn't matter
}
/*
* ===========================================================================
@ -304,7 +267,7 @@ BEGIN_MESSAGE_MAP(PrefsFviewPage, CPropertyPage)
ON_CONTROL_RANGE(BN_CLICKED, IDC_PVIEW_HITEXT, IDC_PVIEW_TEXT8, OnChangeRange)
ON_EN_CHANGE(IDC_PVIEW_SIZE_EDIT, OnChange)
ON_CBN_SELCHANGE(IDC_PVIEW_DHR_CONV_COMBO, OnChange)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp)
END_MESSAGE_MAP()
@ -377,18 +340,6 @@ void PrefsFviewPage::DoDataExchange(CDataExchange* pDX)
DDV_MinMaxUInt(pDX, fMaxViewFileSizeKB, 1, 32767);
}
LONG PrefsFviewPage::OnHelp(UINT wParam, LONG lParam)
{
WinHelp((DWORD) ((HELPINFO*) lParam)->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
LONG PrefsFviewPage::OnCommandHelp(UINT, LONG)
{
WinHelp(HELP_TOPIC_PREFS_FVIEW, HELP_CONTEXT);
return 0; // doesn't matter
}
/*
* ===========================================================================
@ -400,7 +351,7 @@ BEGIN_MESSAGE_MAP(PrefsFilesPage, CPropertyPage)
ON_EN_CHANGE(IDC_PREF_TEMP_FOLDER, OnChange)
ON_EN_CHANGE(IDC_PREF_EXTVIEWER_EXTS, OnChange)
ON_BN_CLICKED(IDC_PREF_CHOOSE_TEMP_FOLDER, OnChooseFolder)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
ON_MESSAGE(WM_COMMANDHELP, OnCommandHelp)
END_MESSAGE_MAP()
@ -465,18 +416,6 @@ void PrefsFilesPage::OnChooseFolder(void)
}
}
LONG PrefsFilesPage::OnHelp(UINT wParam, LONG lParam)
{
WinHelp((DWORD) ((HELPINFO*) lParam)->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
LONG PrefsFilesPage::OnCommandHelp(UINT, LONG)
{
WinHelp(HELP_TOPIC_PREFS_FILES, HELP_CONTEXT);
return 0; // doesn't matter
}
/*
* ===========================================================================
@ -488,7 +427,7 @@ BEGIN_MESSAGE_MAP(PrefsSheet, CPropertySheet)
ON_WM_NCCREATE()
ON_BN_CLICKED(ID_APPLY_NOW, OnApplyNow)
ON_COMMAND(ID_HELP, OnIDHelp)
ON_MESSAGE(WM_HELP, OnHelp)
ON_MESSAGE(WM_HELP, OnHelpInfo)
END_MESSAGE_MAP()
PrefsSheet::PrefsSheet(CWnd* pParentWnd) :
@ -564,14 +503,3 @@ void PrefsSheet::OnIDHelp(void)
LOGD("PrefsSheet OnIDHelp");
SendMessage(WM_COMMANDHELP);
}
LONG PrefsSheet::OnHelp(UINT wParam, LONG lParam)
{
HELPINFO* lpHelpInfo = (HELPINFO*) lParam;
LOGD("PrefsSheet OnHelp");
DWORD context = lpHelpInfo->iCtrlId;
WinHelp(context, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -12,6 +12,7 @@
#include "Preferences.h"
#include "../util/UtilLib.h"
#include "resource.h"
#include "HelpTopics.h"
/*
* The "general" page, which controls how we display information to the user.
@ -57,8 +58,13 @@ protected:
afx_msg void OnChangeRange(UINT);
afx_msg void OnDefaults(void);
afx_msg void OnAssociations(void);
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam) {
MyApp::HandleHelp(this, HELP_TOPIC_PREFS_GENERAL);
return TRUE;
}
DECLARE_MESSAGE_MAP()
};
@ -92,8 +98,13 @@ protected:
afx_msg void OnChange(void);
//afx_msg void OnChangeRange(UINT);
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam) {
MyApp::HandleHelp(this, HELP_TOPIC_PREFS_DISK_IMAGE);
return TRUE;
}
DECLARE_MESSAGE_MAP()
};
@ -122,8 +133,13 @@ protected:
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg void OnChangeRange(UINT);
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam) {
MyApp::HandleHelp(this, HELP_TOPIC_PREFS_COMPRESSION);
return TRUE;
}
private:
/*
@ -185,8 +201,13 @@ protected:
afx_msg void OnChange(void);
afx_msg void OnChangeRange(UINT);
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam) {
MyApp::HandleHelp(this, HELP_TOPIC_PREFS_FVIEW);
return TRUE;
}
DECLARE_MESSAGE_MAP()
};
@ -213,8 +234,13 @@ protected:
afx_msg void OnChange(void);
afx_msg void OnChooseFolder(void);
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
afx_msg LONG OnCommandHelp(UINT wParam, LONG lParam) {
MyApp::HandleHelp(this, HELP_TOPIC_PREFS_FILES);
return TRUE;
}
MyBitmapButton fChooseFolderButton;
@ -271,13 +297,15 @@ protected:
* it to the active PropertyPage. Each page must handle WM_COMMANDHELP by
* opening an appropriate chapter in the help file.
*/
afx_msg LONG OnHelp(UINT wParam, LONG lParam);
afx_msg void OnIDHelp(void);
/*
* Context help request (question mark button) on something outside of the
* property page, most likely the Apply or Cancel button.
*/
afx_msg void OnIDHelp(void);
afx_msg LONG OnHelpInfo(UINT wParam, LONG lParam) {
return MyApp::HandleHelpInfo((HELPINFO*) lParam);
}
DECLARE_MESSAGE_MAP()
};

View File

@ -6,7 +6,6 @@
#include "stdafx.h"
#include "RecompressOptionsDialog.h"
#include "NufxArchive.h"
#include "HelpTopics.h"
//BEGIN_MESSAGE_MAP(UseSelectionDialog, CDialog)
// ON_WM_HELPINFO()

View File

@ -5,7 +5,6 @@
*/
#include "stdafx.h"
#include "RenameEntryDialog.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(RenameEntryDialog, CDialog)
ON_WM_HELPINFO()
@ -101,14 +100,3 @@ void RenameEntryDialog::OnSkip(void)
*/
EndDialog(IDIGNORE);
}
BOOL RenameEntryDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void RenameEntryDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_RENAME_ENTRY, HELP_CONTEXT);
}

View File

@ -53,8 +53,12 @@ protected:
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg void OnSkip(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_RENAME_ENTRY);
}
private:
//CString fOldPath; // pathname component, or empty if canRenFull

View File

@ -7,7 +7,6 @@
#include "RenameVolumeDialog.h"
#include "DiskFSTree.h"
#include "DiskArchive.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(RenameVolumeDialog, CDialog)
ON_NOTIFY(TVN_SELCHANGED, IDC_RENAMEVOL_TREE, OnSelChanged)
@ -135,14 +134,3 @@ void RenameVolumeDialog::OnSelChanged(NMHDR* pnmh, LRESULT* pResult)
*pResult = 0;
}
BOOL RenameVolumeDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}
void RenameVolumeDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_RENAME_VOLUME, HELP_CONTEXT);
}

View File

@ -48,8 +48,12 @@ protected:
*/
afx_msg void OnSelChanged(NMHDR* pnmh, LRESULT* pResult);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_RENAME_VOLUME);
}
DiskFSTree fDiskFSTree;

View File

@ -153,9 +153,3 @@ void TwoImgPropsDialog::OnChange(void)
checked = pButton->GetCheck();
GetDlgItem(IDC_TWOIMG_DOSVOLNUM)->EnableWindow(checked == BST_CHECKED);
}
BOOL TwoImgPropsDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -36,7 +36,9 @@ protected:
virtual BOOL OnInitDialog(void) override;
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
/*
* If they changed anything, enable the "save" button.

View File

@ -5,7 +5,6 @@
*/
#include "stdafx.h"
#include "UseSelectionDialog.h"
#include "HelpTopics.h"
BEGIN_MESSAGE_MAP(UseSelectionDialog, CDialog)
ON_WM_HELPINFO()
@ -59,9 +58,3 @@ void UseSelectionDialog::DoDataExchange(CDataExchange* pDX)
{
DDX_Radio(pDX, IDC_USE_SELECTED, fFilesToAction);
}
BOOL UseSelectionDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
{
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE; // yes, we handled it
}

View File

@ -42,8 +42,9 @@ protected:
virtual BOOL OnInitDialog(void) override;
virtual void DoDataExchange(CDataExchange* pDX) override;
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo);
//afx_msg void OnHelp(void);
afx_msg BOOL OnHelpInfo(HELPINFO* lpHelpInfo) {
return MyApp::HandleHelpInfo(lpHelpInfo);
}
private:
int fSelectedCount;

View File

@ -10,7 +10,6 @@
#include "ViewFilesDialog.h"
#include "Main.h"
#include "Print.h"
#include "HelpTopics.h"
#include "../util/UtilLib.h"
@ -1257,8 +1256,3 @@ void ViewFilesDialog::FindNext(const WCHAR* str, bool down, bool matchCase,
pMain->FailureBeep();
}
}
void ViewFilesDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_FILE_VIEWER, HELP_CONTEXT);
}

View File

@ -106,7 +106,9 @@ protected:
afx_msg void OnFviewFmtHex(void);
afx_msg void OnFviewFmtRaw(void);
afx_msg void OnFormatSelChange(void);
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_FILE_VIEWER);
}
//afx_msg void OnFviewWrap(void);
afx_msg LRESULT OnFindDialogMessage(WPARAM wParam, LPARAM lParam);

View File

@ -13,7 +13,6 @@
*/
#include "stdafx.h"
#include "VolumeCopyDialog.h"
#include "HelpTopics.h"
#include "Main.h"
@ -381,11 +380,6 @@ bool VolumeCopyDialog::GetSelectedDisk(DiskImg** ppDiskImg, DiskFS** ppDiskFS)
return true;
}
void VolumeCopyDialog::OnHelp(void)
{
WinHelp(HELP_TOPIC_VOLUME_COPIER, HELP_CONTEXT);
}
void VolumeCopyDialog::OnCopyToFile(void)
{
VolumeXferProgressDialog* pProgressDialog = NULL;

View File

@ -59,7 +59,9 @@ protected:
*/
afx_msg void OnCopyFromFile(void);
afx_msg void OnHelp(void);
afx_msg void OnHelp(void) {
MyApp::HandleHelp(this, HELP_TOPIC_VOLUME_COPIER);
}
/*
* When the focus changes, e.g. after dialog construction completes, see if

View File

@ -159,6 +159,7 @@ BOOL SelectFilesDialog::OnFileNameOK()
}
} else if (LOWORD(wParam) == pshHelp) {
pSFD->HandleHelp();
return 0; // default handler will post "unable to open help"
}
}
}

View File

@ -394,12 +394,6 @@ void ShowFailureMsg(CWnd* pWnd, const CString& msg, int titleStrID)
pWnd->MessageBox(msg, failed, MB_OK | MB_ICONERROR);
}
BOOL ShowContextHelp(CWnd* pWnd, HELPINFO* lpHelpInfo)
{
pWnd->WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
return TRUE;
}
bool IsWin9x(void)
{
OSVERSIONINFO osvers;

View File

@ -181,11 +181,6 @@ void GetWin32ErrorString(DWORD err, CString* pStr);
*/
void ShowFailureMsg(CWnd* pWnd, const CString& msg, int titleStrID);
/*
* Show context help, based on the control ID.
*/
BOOL ShowContextHelp(CWnd* pWnd, HELPINFO* lpHelpInfo);
/*
* Returns "true" if we're running on Win9x (Win95, Win98, WinME), "false"
* if not (could be WinNT/2K/XP or even Win31 with Win32s).