Microsoft KB Archive/83020

From BetaArchive Wiki

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 "Other", which when chosen brings up the About Help dialog box. The second button is labeled "Test". When chosen, it disables the "Other" button and jumps to the topic represented by "context_string." To create the "Test" 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("other_button","&Other","About()")

; This macro also creates a button. Choosing the button disables
; "other_button", created above, and jumps to the topic represented by
; "topic_string."
;
; 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.

CreateButton("test_button","&Test","DisableButton(`Other_Button'):
JumpId(`testhelp.hlp',`context_string')") 

Additional query words: 3.10 3.50 4.00 95 win16sdk

Keywords :
Issue type :
Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310


Last Reviewed: March 6, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.