Microsoft KB Archive/87343

{|
 * width="100%"|

Creating a Glossary Button in Windows Help

 * }

Q87343

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1

-

SUMMARY
HLPGLOSS is a file in the Microsoft Software Library that demonstrates how to add a Glossary button to the button bar in the Microsoft Windows Help application. The help file for the Windows Program Manager is an example of a popular help file that has a Glossary button. When the user chooses the Glossary button, Help displays the Glossary topic in a secondary window.

MORE INFORMATION
Hlpgloss.exe

For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

To create a Glossary button, two items must be added to the Help project (.HPJ) file:


 * 1) In the [CONFIG] section, add the CreateButton macro, which creates the &quot;Glossary&quot; button and programs the button to jump to the topic that contains glossary information.

The third parameter of the CreateButton macro can contain the JumpContents, JumpContext, or JumpID macro. Specify JumpContents to move to the Contents topic of a Help file. Specify JumpContext to jump to the topic in a Help file with a specific context number. Specify JumpID to jump to the topic in a Help file with a specific context identifier. Any of these macros can move to a topic in the current Help file or to a topic in a different Help file.

NOTE: If the glossary topic is in a different .HLP file, the [WINDOWS] section in its .HPJ file must define the secondary window. For more information on the CreateButton macro, see pages 309 and 310 of the &quot;Programmer's Reference, Volume 4: Resources&quot; manual distributed with version 3.1 of the Microsoft Windows Software Development Kit (SDK).
 * 1) In the [WINDOWS] section, add a definition for the secondary window in which glossary information is displayed. This line defines the size, position, and color of the secondary window. For more information on the [WINDOWS] section of the .HPJ file, see pages 64 through 66 of the Windows SDK &quot;Programming Tools&quot; manual.

The following fragment of an .HPJ file demonstrates these two steps:

[CONFIG] CreateButton(&quot;Glossary_Btn&quot;,&quot;&Glossary&quot;,&quot;JI(`hlpgloss.hlp>Gloss', `Glossary_Context')&quot;)
 * Because the help topic is in this Help file and the context
 * identifier is available, the code below specifies the JumpId (JI)
 * macro. The glossary is shown in the secondary &quot;Glossary&quot; window
 * specified in the [WINDOWS] section below. The peculiar single quotes
 * are significant. Note: In an actual Help project file, the following
 * information appears on one line (no break).

[WINDOWS] Gloss = &quot;Glossary&quot;,(100,100,350,350),0,(255,255,255),(255,255,255) Additional query words: WinHelp softlib HLPGLOSS.EXE kbfile kbtool
 * Define the secondary window for the glossary in the [WINDOWS]
 * section of the HPJ file for the Help file that contains the glossary
 * topic.

Keywords : kbfile kbsample kb16bitonly kbOSWin310

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310