How to make "Help" in VC++ 4.x

Hello~  experts..
I want to make "Help" in VC++ 4.x (Win32 API)
please, show me the way to make "Help" in step by step.
(.cnt, .rtf ??) and send me the examples..
what is hcw.exe and hcrtf.exe ??
and how to use it ?  ^^;...
Who is Participating?
Answers2000Connect With a Mentor Commented:
I'm going to cut and paste so this may be a bit, disjointed all the bits should be there though....


A. Basically you need to make a .HLP file (this is the "help" file you distribute.

B. You need to invoke the .HLP file from your C++ source code


There are two methods of authoring

1. You author help topics in a word processor which can output RTF files (e.g. MS Word), you insert special tags into the help file to make hyperlinks and soforth between topics


2. You use a commercial or shareware tool to create the help source files
Recommendation : buy Doc2Help or RoboHelp.  These are excellent (you will also need MS Word).

If you want a shareware tool try AnetHelpTool this is pretty good and doesn't need word.  I had to mess around a bit to make it kick off my help compiler successfully, but having done that it works well.  Until you register, you're limited to the number of topics (how many pages of help) you can create.
Anet help tool site is 

There's a great link page at 

Help author's guide can be obtained from

--> Additionally you need a .HPJ file (Help Project File) which HCW or one of the above tools can make for you.  This controls the compilation of the help file.  
From personal experience I really recommend the Anet Help Tool as a quick way to get started with authoring.

HCW is the Windows Help Compiler that converts the RTF into a .HLP
HCRTF is used by HCW (you don't normally run this yourself)

---> At the end of this you will have a .HLP file.  You can test this .HLP by running WinHelp.Exe and using FileOpen to load the file.

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  with your help file

 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 (this allows you to jump to a specific page in the help, the context numbers are associated with the pages when you author the help)
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.