HtmlHelp(): how to use HH_HELP_CONTEXT and HH_KEYWORD_LOOKUP
Posted on 1998-08-26
I am experiencing several problems using the function HtmlHelp() in my MFC application.
I overridden WinHelp() in my mainframe class and commented out the call to WinHelp(). Now, I try to use HtmlHelp() instead.
The following call shows the default topic as expected:
HWND hwnd=HtmlHelp(pWnd->m_hWnd, "c:\\MyHelp\\MyHelp.chm", HH_DISPLAY_TOPIC, NULL);
I can even display a specific HTM file:
HWND hwnd=HtmlHelp(pWnd->m_hWnd, "c:\\MyHelp\\MyHelp.chm", HH_DISPLAY_TOPIC, (DWORD)((LPCTSTR)"MyTopic.htm"));
But, I didin't manage to reach a specific topic using an ID:
HWND hwnd=HtmlHelp(pWnd->m_hWnd, "c:\\MyHelp\\MyHelp.chm", HH_HELP_CONTEXT, HID_BASE_RESOURCE+ID_FILE_OPEN);
I get an error message: "HH_HELP_CONTEXT called without a [MAP] section". But I have a [MAP] section in my help project file.
I have the same problem with HH_KEYWORD_LOOKUP. I read the documentation many times but, without a sample I cannot understand how it should work.
Any (html)help will greatly appreciated! ;-)