The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Ron_Co on March 19, 2009, 05:33:54 AM

Title: Calling Help files from masm32
Post by: Ron_Co on March 19, 2009, 05:33:54 AM
I have created a win32 program in masm32 and I have created a Help file for this program. How do I call this help file from inside my program?
Title: Re: Calling Help files from masm32
Post by: donkey on March 19, 2009, 06:05:24 AM
What type of help file ? There are currently 3 help systems for Windows, .hlp (WinHelp), .CHM (HTML Help 1.x) and .Hx (HTML Help2). All have specific APIs to use them..

For CHM files look here:
http://msdn.microsoft.com/en-us/library/ms670168(VS.85).aspx

For Help2 files check out the GoAsm forum here:
http://www.masm32.com/board/index.php?topic=10912.0

Title: Re: Calling Help files from masm32
Post by: Jimg on March 19, 2009, 01:42:01 PM
If it is a standard help file that runs when you double click on it, the simple answer is just execute it using WinExec.
Title: Re: Calling Help files from masm32
Post by: jj2007 on March 19, 2009, 01:56:03 PM
For *.hlp, use this:

invoke WinHelp, hWin, chr$("MyHelpFile.hlp"), HELP_PARTIALKEY, chr$("FindThisWord")

Before closing your program, close Help like this:

invoke WinHelp, 0, 0, HELP_QUIT, 0
invoke DestroyWindow, hWin ; destroy main window and all its children
...