Click to See Complete Forum and Search --> : Mapping button to help topic


Jim Weiss
July 1st, 1999, 10:58 AM
How can I map a button on my toolbar to bring up a specific help topic in my MyApp.hlp file? Thanks for any help.

chiuyan
July 1st, 1999, 11:28 AM
If you know the help context (topic) number, you can do:
::WinHelp (m_hWnd, "MyApp.hlp", HELP_CONTEXT, MyHelpTopicNumber))
// MyHelpTopicNumber is the unsigned integer (long) ID of the help topic


HTH
--michael

Jim Weiss
July 1st, 1999, 11:42 AM
I looked at this. I have two questions: how do I set or find the topic number? And when I put "Myapp.hlp" in and ran the program, it said it couldn't find the file. Do I have to put the whole path to it? I worry that on installation the user will override the default and install the program in a different place and the path I hard code won't lead to the file. Any ideas on these two questions? Thanks.

chiuyan
July 1st, 1999, 11:58 AM
I do not know about setting the ID, I have never mad a help file (I can ask our documentation person after lunch and then get back to you)

About the path to the file. What I would do is write an install path to the registry when you program is installed, and then you can just get that path from the registry & strcat on the help file name.

HTH
--michael