![]() |
General Programming »
WinHelp / HTMLHelp »
General
Intermediate
License: The Code Project Open License (CPOL)
Creating and Using HTML Help in MFC applicationsBy Nguyen Thanh PhuongManaging HTML Help from scratch |
C++, Windows, Visual Studio, Dev
|
||||||||||
|
Advanced Search |
|
|
|
||||||||||||||||
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:
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.
In this example, I use PowerDVD.chm file because it has the same help structure with my application.
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
That all you need to do to create your own .chm file, now forward to the 2nd stage.
Step 6. Create a registry key:
Step 7. Create an MFC application.
Step 8. Import htmlhelp.lib to your application
Step 9. Call Help
#include "htmlhelp.h"
void CTestHelpDlg::OnHelp() { HtmlHelp(this->m_hWnd, "HelpSample.chm", HH_DISPLAY_TOPIC, NULL); }
That's your work done!
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 3 Jul 2006 Editor: Sean Ewington |
Copyright 2006 by Nguyen Thanh Phuong Everything else Copyright © CodeProject, 1999-2009 Web13 | Advertise on the Code Project |