Solved

Use multiple .HLP files in an app

Posted on 1998-08-28
3
194 Views
Last Modified: 2010-04-01
I would like to add a new menu option to my application's help menu to look at an existing help file ( does not need to compile it ).  How could I do that?  Do I use the WinHelp?

You help is appreciated...
0
Comment
Question by:akhaligh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:akhaligh
ID: 1171469
Edited text of question
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1171470
1. Add menu option(s) to your resources
2. Add a handler for the WM_COMMAND message corresponding to the menu option(s)
3. Use the WinHelp API call to start the WinHelp application (full details in the comment below) with your help file
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1171471
1. WinHelp API call is defined:

BOOL WinHelp( HWND hWndMain,  // handle of window requesting Help
LPCTSTR lpszHelp,
 // address of directory-path string
 
UINT uCommand,
 // type of Help
 
DWORD dwData
 // additional data
 
);
 
2. Set hWndMain to the main window of your app
3. Set lpszHelp to the path to help file
4. Set other 2 params depending on what you want to do
a. uCommand to HELP_CONTENTS, dwData to 0, to just display the contents page of the help file
b. uCommand to HELP_QUIT, dwData to 0, to close the help file (do this when you close your app)
c. uCommand to HELP_HELPONHELP, dwData to 0, to display help on how to use Windows help
d. uCommand to HELP_CONTEXT, dwData to the context id of the topic to display a particular topic (generally you'll need to be the author of the help file to know the topic ids, or get the author to tell you what they are)
e. uCommand to HELP_KEY, dwData to address of a keyword to display help on a particular keyword in your app.  You need to cast, something like
WinHelp( ..etc.., HELP_KEY, (DWORD)(LPCSTR)"keyword" ) ;
f. Many more options are listed in the SDK documentation, most of these are not that useful unless you are the author or have cooperation from the help author.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Writing a parser for java language 4 100
I could not build boost code, 10 114
White board coding practice 3 98
C++ Code Issue 4 45
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question