Solved

Use multiple .HLP files in an app

Posted on 1998-08-28
3
191 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now