views:

447

answers:

4

Hi,

I'm trying to add some help to my GUI developed in VC++ 2008. I want to compile a chm file, or a hlp file that can be accessed from my menu. Anyone can give me any idea about how to do this?

Thanks a lot

A: 

Sorry, I misunderstood your question earlier.

For opening the Help file, you can use WinHelp

Some Links:

First (PDF)
Second
Third

There are some issues with WinHelp in Windows Vista and Win2K8, For details on how to deal with them, Look here

Aamir
I know how to create this files, I want to know how to link them to my app.
deb
+1  A: 

You could just ShellExecute the .chm file. That will open it.

Goz
A: 

If you are using managed C++:

In the namespace

System.Windows.Forms

you can find the class Help with static methods ShowHelp, ShopHelpIndex

More info: http://msdn.microsoft.com/en-us/library/system.windows.forms.help.aspx

If you are using unmanaged C++ (WIN32 api):

You can just launch the *.chm file. Example how to do it you can find here: http://stackoverflow.com/questions/42531/how-do-i-call-createprocess-in-c-to-launch-a-windows-executable . Or here http://www.codeproject.com/KB/system/newbiespawn.aspx

Perica Zivkovic
I used Win API 32
deb
+2  A: 

Under HKLM\Software\Microsoft\Windows\HTMLHelp , create an entry
named help.chm
value C:\path to\help file.chm

Then to open the chm at a particular topic call

 HtmlHelp(m_hWnd, "Help.chm", HH_DISPLAY_TOPIC, NULL);
Martin Beckett
Nice! Thanks a lot.
deb