Microsoft KB Archive/83020

{|
 * width="100%"|

Semicolons Cannot Separate Macros in .HPJ File

 * }

Q83020

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1
 * Microsoft Win32 SDK, versions 3.5, 3.51, and 4.0

-

SUMMARY
The author of a Help system can combine individual macro commands into a macro string, which the Microsoft Help Compiler processes as a unit. When the macro string is part of an RTF text file, the individual macros in the string are separated from each other with a semicolon character. The Help system runs the individual macros of a macro string sequentially.

The author can define a macro string that is run when the user loads a Help file. This macro string is placed into the [CONFIG] section of the Help project (.HPJ) file. However, in the .HPJ file, the individual macros of the string are separated from each other with a colon character because the semicolon character indicates the beginning of a comment.

MORE INFORMATION
In the following sample [CONFIG] section, a macro adds two buttons to the Help window's button bar. The first button is labeled &quot;Other&quot;, which when chosen brings up the About Help dialog box. The second button is labeled &quot;Test&quot;. When chosen, it disables the &quot;Other&quot; button and jumps to the topic represented by &quot;context_string.&quot; To create the &quot;Test&quot; button, two macros are concatenated to form the macro parameter in the CreateButton call.

[CONFIG]
 * This first button is added so that the demonstration macro is
 * complete. This macro just creates a button. Choosing the button
 * brings up the About Help dialog box.

CreateButton(&quot;other_button&quot;,&quot;&Other&quot;,&quot;About&quot;)


 * This macro also creates a button. Choosing the button disables
 * &quot;other_button&quot;, created above, and jumps to the topic represented by
 * &quot;topic_string.&quot;
 * Note that the two macros in the CreateButton macro are separated by
 * a colon, not a semicolon.
 * NOTE: The following macro should appear on a single line.
 * NOTE: The following macro should appear on a single line.
 * NOTE: The following macro should appear on a single line.

CreateButton(&quot;test_button&quot;,&quot;&Test&quot;,&quot;DisableButton(`Other_Button'): JumpId(`testhelp.hlp',`context_string')&quot;) Additional query words: 3.10 3.50 4.00 95 win16sdk

Keywords :

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310