• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

context sensitive help and resource id mapping

New Here ,
Oct 24, 2008 Oct 24, 2008

Copy link to clipboard

Copied

We are having a problem associating MFC-based application with context-sensitive help. We have imported the resource.h file which looks like

#define IDD_CONFIG_SEND 102
#define IDD_CONFIG_SAVE 143

into RoboHelp and mapped ids IDD_CONFIG_SAVE etc to various topics. However I'm noticing that when MFC invokes HtmlHelp it actually passes the topic id formed by HID_BASE_RESOURCE + IDD_CONFIG_SAVE so it becomes 0x20066 instead of just 0x66 and the topic is not found. What are we doing wrong?

Also: when I press F1 on a ui item which doesn't have a topic associated with it, HtmlHelp brings up an error window "Failed to launch help". Is there a way to go to a default topic instead?

Thanks!

Views

774

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 27, 2008 Oct 27, 2008

Copy link to clipboard

Copied

Hi mkruk1913.

I can't answer your first query as I am not from a development background. However it should be possible to define code the application call to say that if the F1 key is pressed and there is no mapid associated with the dialog, to open the help file at the default topic. In a previous incarnation we used a VB app and had a mapid of 0 (zero) specifically for this purpose.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 27, 2008 Oct 27, 2008

Copy link to clipboard

Copied

LATEST
My error was that I was feeding resource.h directly into RoboHelp. In fact I had to generate another .h file which is usually called HTMLDefines.h. Visual Studio creates the following script for doing it:

echo // Generated Help Map file. Used by helptest.HHP. > "HTMLDefines.h"
echo. > "HTMLDefines.h"
echo // Commands (ID_* and IDM_*) >> "HTMLDefines.h"
makehm /h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 "$(InputFileName)" >> "HTMLDefines.h"
echo. >> "HTMLDefines.h"
echo // Prompts (IDP_*) >> "HTMLDefines.h"
makehm /h IDP_,HIDP_,0x30000 "$(InputFileName)" >> "HTMLDefines.h"
echo. >> "HTMLDefines.h"
echo // Resources (IDR_*) >> "HTMLDefines.h"
makehm /h IDR_,HIDR_,0x20000 "$(InputFileName)" >> "HTMLDefines.h"
echo. >> "HTMLDefines.h"
echo // Dialogs (IDD_*) >> "HTMLDefines.h"
makehm /h IDD_,HIDD_,0x20000 "$(InputFileName)" >> "HTMLDefines.h"
echo. >> "HTMLDefines.h"
echo // Frame Controls (IDW_*) >> "HTMLDefines.h"
makehm /h /a afxhh.h IDW_,HIDW_,0x50000 "$(InputFileName)" >> "HTMLDefines.h"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp