Solved

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

Posted on 1998-09-01
1
239 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

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

Suggested Solutions

Title # Comments Views Activity
SQL to ElasticSearch Query 1 584
Dir function fails on mapped drives 28 123
Example of WebAPI 7 32
GUI: DIalog Stacking and Popping in MS C++ 4 65
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

867 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

16 Experts available now in Live!

Get 1:1 Help Now