Using Graphics Within a Help File

This article was previously published under Q90291
This article has been archived. It is offered "as is" and will no longer be updated.
This article explains how to use graphics in a Help file with both the helpcompiler 3.1 (HC30.EXE, HC31.EXE, and HCP.EXE) and the help compiler 4.0(HCW.EXE).


With the Help Compiler, four types of graphics can be displayed within helptopics: bitmaps, metafiles, segmented hypergraphics, and multipleresolution bitmaps. With HC30 and HC31, these graphics are limited to 16colors but it is possible to use embedded windows to create a 256-colorbitmap. HCW is capable of displaying 16 million colors.

The following section discusses the details of the graphics formats listedabove, and provides details on their advantages and disadvantages.


A bitmap is an image that is described by a matrix of memory bits that,when copied to a device, define the color and pattern of a correspondingmatrix of pixels on the display surface of the device. The advantage tousing a bitmap is that drawing a bitmap is very fast. The disadvantage isthat the size of a bitmap is very large. Bitmaps can be created with agraphics editor, such as Paintbrush.


A metafile is a collection of GDI commands that creates desired text orimages. There are two advantages to using metafiles: the size of themetafile is small, and metafiles are less device-dependent than bitmaps.The disadvantage of using a metafile is that it takes a long time to drawone.

Segmented Hypergraphics

A segmented hypergraphic is a graphic that has hot spots defined in variousregions of the graphic. Clicking hot spots either executes a macro or jumpsto a context string. To make a segmented hypergraphic, use the segmentedhypergraphic (hot spot) editor (SHED.EXE) included with the Windows 3.1SDK.

Multiple Resolution Bitmaps

A multiple resolution bitmap is a single bitmap file that contains one ormore bitmaps that have been marked for use with specific displays. Theadvantages of multiple resolution bitmaps are:
  1. Bitmaps are prevented from appearing too big or too small on different resolutions.
  2. Bitmaps are prevented from looking stretched or compressed from display to display.
  3. Colors are mapped correctly on different displays.
The disadvantage of multiple resolution bitmaps is that the files arelarge. multiple resolution bitmaps can be created from bitmap fileswith the multiple resolution bitmap compiler, MRBC.


Direct Pasting

Bitmaps and metafiles can be pasted directly from the clipboard intoan RTF source file. This allows the help author to see what the topicwill look like while it is being edited. There are severaldisadvantages to this method. The first disadvantage only applies to HC30and HC31. It is that any graphic pasted directly into a topic is limited to64K. This is the result of the help compiler's 64K per paragraph limit whenprocessing RTF source files. The second disadvantage applies to all thehelp compilers. It is size. If the same graphic is used multiple timeswithin the same source file, then a copy of the graphic is made each timeit is placed within the source.

By Reference

All of the graphics can be placed "by reference." To insert a graphicby reference, the help author must type {bm? graphic.ext} where bm? isbml, bmr, or bmc and graphic.ext is the name of the graphic file thatthe author wants to have placed in the help topic. The bml command isused for a left-justified graphic, the bmr command is used for a rightjustified graphic, and the bmc command is used for a characterjustified graphic (that is, the graphic is inserted into the paragraphas if it were a character).

One of the advantages of placing a graphic by reference is that itlifts the 64K limit on a graphic. Also, a graphic placed by referenceis actually just a "pointer" to the real graphic. Therefore, if thesame graphic is used multiple times, it is only "stored" once withinthe .HLP file.

The disadvantage of placing graphics by reference is that the helpauthor does not see how the topic will appear while in the RTF editor.The bitmap files inserted by reference must be found in the directoryspecified by either the ROOT or BMROOT settings in the [OPTIONS]section of the help project file. If the bitmap is not located in oneof these directories, then the file must be listed in the [BITMAPS]section of the project file, so the help compiler can locate thebitmap.

Hot Spots and Pop Ups

When placing a graphic into an RTF source file, it can be turned intoa hot spot or pop up, similar to other text. Just select the graphicand turn on the double or single underline attribute followedimmediately by the hidden text for the context string or macro.
3.10 4.00 95 WinHelp win16sdk

Article ID: 90291 - Last Review: 01/09/2015 05:00:46 - Revision: 2.0

  • Microsoft Windows Software Development Kit 3.1
  • Microsoft Win32 Software Development Kit (SDK) 3.51
  • Microsoft Win32 Software Development Kit (SDK) 4.0
  • kbnosurvey kbarchive KB90291