0

I am using the Windows 10 Enterprise OS. I have a help file in CHM format that cannot be opened in a Windows 10 box. All it says is "Failed to launch help." I wrote a tiny program to try this. Here's the important bit of code:

void CHelpFileTEstDlg::OnBnClickedButton1()
{
    CWinApp* pApp = AfxGetApp();
    AfxMessageBox(pApp->m_pszHelpFilePath);
    pApp->m_pszHelpFilePath = _T("C:\\Dev\\LD\\RSLogix5000\\BuildProducts\\Debug\\PSModuleENU.chm");

    AfxMessageBox(_T("Does this help button work?"), MB_YESNO | MB_HELP | MB_ICONEXCLAMATION, 196743);
}

When I click the Help button, I get the same "Failed to launch help." message, but also, a web page appears in my browser saying that help system I'm using is not support in Windows 10. Here's that link.

I had already asked a question in this context a day before (see also for further information).

Is there a tool I can use to modernize the CHM file to make it usable on my machine?

help-info.de
  • 6,695
  • 16
  • 39
  • 41
ROBERT RICHARDSON
  • 2,077
  • 4
  • 24
  • 57

1 Answers1

0

I have never seen a CHM help file that did not work on Windows 10.

The link you mentioned points to an even older help system namely WinHelp with the .hlp file extension.

This help system has not been supported for a long time. Only extensive steps still allowed to open *.hlp WinHelp files some time ago (see https://stackoverflow.com/a/43643026/1981088).

There may be a confusion between WinHelp (.hlp) and HTMLHelp (.chm). To test this, copy your help file into a local directory and double click on it. The file must then be opened and displayed in a help window under Windows 10.

AFAIK - you'll not need a tool to modernize a CHM file for use under Windows 10.

FYI - I remember some old stuff Connecting HTML Help to C++/MFC Programs

help-info.de
  • 6,695
  • 16
  • 39
  • 41
  • Double-clicking the help file opens it with no problem. I just can't set up an application to use a help topic within my help file through AfxMessageBox(). Given the code above, can you think of a reason why not? – ROBERT RICHARDSON Nov 11 '22 at 20:46
  • Is there a way to get further information on why help could not be launched? I can't tell if the context ID isn't found or the entire help file isn't found or some other error happened. – ROBERT RICHARDSON Nov 11 '22 at 21:40
  • I am not an experienced C++ programmer. I added the C++ tag to your question and also a reference to your previous question. – help-info.de Nov 12 '22 at 08:40
  • @ROBERTRICHARDSON double-clicking in Explorer simply opens the file in the associated application (HTMLhelp in this case); surely it is a matter of doing the same programmatically via `ShellExecute` for example? https://stackoverflow.com/questions/9115574/how-can-you-open-a-file-with-the-program-associated-with-its-file-extension – Clifford Nov 12 '22 at 09:32
  • I am trying to debug an application that uses AfxMessageBox(). Therefore, I need to know why AfxMessageBox() is failing for this particular file. ShellExecute() is not an option. – ROBERT RICHARDSON Nov 12 '22 at 14:23