Failed to launch help

Hello,

I'm working with a Visual Studio 2015 C++ program converted from a VS 6.0 C++ program.

When I run the program and select "Help" from the menus, it gives this messagebox: https://drive.google.com/open?id=0B3Jw7h2K4ZvkcHdXbTRMYjMwTWc

I can't find the text "Failed to launch help" anywhere in the solution.

I can't figure out where in the program, the code gets executed when the menu option is selected. I put breakpoints in the code that has "menu" or "help" in the coding, but it never stops on any of them.

I found this code in the program, but it never stops in the debugger when I set a breakpoint on it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void CMagicApp::WinHelp(DWORD dwData, UINT nCmd)
{
#ifdef USE_HTML_HELP
	if (dwData>HID_BASE_RESOURCE && nCmd == 1)
	{
		::HtmlHelp(AfxGetMainWnd()->m_hWnd, GetHelpFilePath(), HH_HELP_CONTEXT, dwData/*-HID_BASE_RESOURCE*/);
	}
	else if (nCmd == 3)
		::HtmlHelp(AfxGetMainWnd()->m_hWnd, GetHelpFilePath(), HH_DISPLAY_TOC, 0);

	/*
	else if (dwData>HID_BASE_COMMAND && nCmd == 1)
	HtmlHelp(AfxGetMainWnd()->m_hWnd, GetHelpFilePath(),
	HH_HELP_CONTEXT, dwData-HID_BASE_RESOURCE);
	*/
#else
	CWinApp::WinHelp(dwData, nCmd);
#endif
}


The help menu option works in VS 6.0 version.

Any help that anyone can provide to fix this problem would be gratefully appreciated.

Thanks,
Tony
Last edited on
Did you define USE_HTML_HELP ?
I'm sorry Thomas.

I didn't know that you had asked this question until today. I can't find the option for these forums to be notified when someone replies to my posts.

I fixed this problem by removing this line: ON_COMMAND(ID_HELP, CFrameWnd::OnHelp) from the message map in the class that inherits public CFramweWnd.

Added this line: ON_COMMAND(ID_HELP, CMagicApp::OnHelp) to the message map in the class that inherits public CWinApp.

Added this code to the .cpp file for the class that inherits public CWinApp:

1
2
3
4
5
6
void CMagicApp::OnHelp() //Modified by Tony Girgenti - added these lines
{
	//CWinApp::OnHelp();
	CMagicApp::WinHelp(HID_BASE_RESOURCE + IDR_MAINFRAME);
	
}


Thanks,
Tony
Last edited on
closed account (E0p9LyTq)
https://msdn.microsoft.com/en-us/library/windows/desktop/ms644702(v=vs.85).aspx
Topic archived. No new replies allowed.