Solved

Use multiple .HLP files in an app

Posted on 1998-08-28
3
193 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
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

808 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