- Online Community Forums » Programming Questions » How to launch a windows help file ?

Credits go to BAF for helping out!
This thread is locked; no one can reply to it. rss feed Print
How to launch a windows help file ?
Wilson Saunders
Member #5,872
May 2005

Can any one tell me how to launch a windows .hlp file from within an allegro program? Specifically what function calls I need to make and what #include is that function in. Also helpfull would be how to flip to a specific page in that help file.

Play my games at

Member #2,981
December 2002

system("start helpfile.hlp"); ?

Wilson Saunders
Member #5,872
May 2005

Thanks BAF that was what I was looking for. You have been a lot more helpfull than google and msdn on this topic. By the way do you know how to make it open on a specific page of that help file?

Play my games at

Member #2,981
December 2002

There are more "friendly" ways, like using the Windows API (they may have specific help stuff, as well) like CreateProcess or whatever, but system will work just fine in most cases.

Wilson Saunders
Member #5,872
May 2005

Since I am not too knowlagable in the windows API or even this magical "system" command. I was wondering if I could append any arguments to the string to get the help file to open to a specific page.

Play my games at

Matthew Dalrymple
Member #7,922
October 2006


I am not too knowlagable in ... this magical "system" command

They system() function will execute any command you can in the dos-prompt.
It's like you're actually typing the command into the prompt.

To go directly to a certain page in a help file, I don't know if that can be done.

Here is what you can do with the start command though

1Starts a separate window to run a specified program or command.
3START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
5 [/WAIT] [/B] [command/program]
6 [parameters]
8 "title" Title to display in window title bar.
9 path Starting directory
10 B Start application without creating a new window. The
11 application has ^C handling ignored. Unless the application
12 enables ^C processing, ^Break is the only way to interrupt
13 the application
14 I The new environment will be the original environment passed
15 to the cmd.exe and not the current environment.
16 MIN Start window minimized
17 MAX Start window maximized
18 SEPARATE Start 16-bit Windows program in separate memory space
19 SHARED Start 16-bit Windows program in shared memory space
20 LOW Start application in the IDLE priority class
21 NORMAL Start application in the NORMAL priority class
22 HIGH Start application in the HIGH priority class
23 REALTIME Start application in the REALTIME priority class
24 ABOVENORMAL Start application in the ABOVENORMAL priority class
25 BELOWNORMAL Start application in the BELOWNORMAL priority class
26 WAIT Start application and wait for it to terminate
27 command/program
28 If it is an internal cmd command or a batch file then
29 the command processor is run with the /K switch to cmd.exe.
30 This means that the window will remain after the command
31 has been run.
33 If it is not an internal cmd command or batch file then
34 it is a program and will run as either a windowed application
35 or a console application.
37 parameters These are the parameters passed to the command/program
40If Command Extensions are enabled, external command invocation
41through the command line or the START command changes as follows:
43non-executable files may be invoked through their file association just
44 by typing the name of the file as a command. (e.g. WORD.DOC would
45 launch the application associated with the .DOC file extension).
46 See the ASSOC and FTYPE commands for how to create these
47 associations from within a command script.
49When executing an application that is a 32-bit GUI application, CMD.EXE
50 does not wait for the application to terminate before returning to
51 the command prompt. This new behavior does NOT occur if executing
52 within a command script.
54When executing a command line whose first token is the string "CMD "
55 without an extension or path qualifier, then "CMD" is replaced with
56 the value of the COMSPEC variable. This prevents picking up CMD.EXE
57 from the current directory.
59When executing a command line whose first token does NOT contain an
60 extension, then CMD.EXE uses the value of the PATHEXT
61 environment variable to determine which extensions to look for
62 and in what order. The default value for the PATHEXT variable
63 is:
67 Notice the syntax is the same as the PATH variable, with
68 semicolons separating the different elements.
70When searching for an executable, if there is no match on any extension,
71then looks to see if the name matches a directory name. If it does, the
72START command launches the Explorer on that path. If done from the
73command line, it is the equivalent to doing a CD /D to that path.

I like signatures that only the signer would understand. Inside jokes are always the best, because they exclude everyone else.

Member #856
December 2000

Just ShellExecute is more straightforward and pretty damn simple too, y'know.

Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Go to: