With The Case Of  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
ActiveX COM Products
Technical Support
  General Q & A
Discussion Board
Contact Us


Get Ready to Unleash the Power of UCanCode .NET

UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"

Create HTML Help and HTML help workshop with HtmlHelp VC++ MFC Example




Last time I tried to search the Internet to get a complete guide of using HTML in an MFC application. I found that there are many topics concern with HTML Help but none of them have the same purpose with my desired work, so after working with HTML Help Workshop and researching documents, I finally decided to write a topic about working with HTML help from scratch.

In this presentation, I'll take you through 9 steps in 2 main stages to integrate an HTML help file with an MFC application. The 2 main stages are:

  1. Create HTML Help files.
  2. Link HTML file to your own MFC application.

Stage 1: Create *.chm (Compiled Help Modul) file

First of all, you need to have HTML Help Workshop installed, it can be downloaded from: Microsoft HTML Help Downloads.

Edit your own *.chm file (Compiled Help Module). You can start from the beginning but I think you’d better modify an existing .chm file that have the same structure with your desired .chm file. Do the following steps:

Step 1. Open HTML Help Workshop.

Step 2. Click File->Decompile

Step 3. Choose destination folder where you want to store files after decompiling. You should create a new folder to store files because many files would be generate after decompiling.

  • Select the existing .chm file.

Step 4. Using an HTML Editor, MS Frontpage for example, to edit the content of the HTML file(s) that has been extracted by HTML Help Workshop to the content that you want to have. This step is alike the process you edit a website.

Step 5. Import and Compile your own help

  • Click File->New->Project. One dialog appear, select Next.
  • Assign a name for the project. Click Next.
  • Check all checkboxes you see in the new dialog. Click Next.
  • In the next three dialog, the New Project Wizards will you to locate the table of contents, the Help index and the html files. You simply choose the appropriate files that HTML Help Workshop has extracted in the folder in Step 3. Click Next each time you've answered one dialog.
  • Click File->Compile

That all you need to do to create your own .chm file, now forward to the 2nd stage.

Stage 2: Aggregate Help file to MFC application

Step 6. Create a registry key:

  • Open command window, type regedit


  • Browse to KEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTMLHelp
  • Create a new string value as follows:
    • Value name is your HTML help file name, for example: SampleHelp.chm
      • Value data is the path where the .chm file locate, for example: C:\TestHelp\MyHelp\ (remember to put one back-slash at the end).


Step 7. Create an MFC application.

Step 8. Import htmlhelp.lib to your application

  • Right click on the Resource Files->Add Files to Folder.
  • Select htmlhelp.lib.


Step 9. Call Help


  • Create a button.
  • Add this line in the TestHelpDlg.cpp
Collapse Copy Code
#include "htmlhelp.h"
  • Assign an even to call the Help
Collapse Copy Code
void CTestHelpDlg::OnHelp() 
  HtmlHelp(this->m_hWnd, "HelpSample.chm", HH_DISPLAY_TOPIC, NULL);

That's your work done!



Copyright ?1998-2022 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to