Solved

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

Posted on 1998-09-01
1
236 Views
Last Modified: 2013-12-03
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 ?  ^^;...
0
Comment
Question by:jhjeon
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1414122
I'm going to cut and paste so this may be a bit, disjointed all the bits should be there though....

GENERAL
---------------------------------------------------------

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


A. MAKING THE HELP FILE
---------------------------------------------------------

There are two methods of authoring

EITHER
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

OR

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 www.anetusa.com

There's a great link page at http://members.aol.com/LindaMoore/helpauth.html

Help author's guide can be obtained from
http://search.shareware.com/code/engine/Find?logop=and&cfrom=quick&orfile=True&hits=25&search=whag&category=MS-Windows%28all%29

--> 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.


A, (CONT'D) COMPILE THE HELP
---------------------------------------------------------
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.


B. ADD CODE TO INVOKE THE HELP
-------------------------------------------------
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.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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