The Display-Bitmap Command

After creating the bitmaps and moving them into the appropriate subdirectory, you can use the display-bitmap command to activate the extended bitmap window. This command has the following parts:

A word, phrase, or bitmap formatted as double underline that serves as the activation point for the command

The display-bitmap command formatted as hidden text

The syntax for the display-bitmap command is as follows:

!HDisplayBmp(hwndContext, qchPath, "bitmapfile","window-title")

The bitmapfile is the name of the bitmap you want displayed surrounded by double quotes (“ ”). Make sure to include the path from the project directory to the bitmap. Any backslashes in the path must be escaped with a backslash (\). That is, you must type any backslash (“\”) in the path as a double backslash (“\\”).

The window-title is the text, surrounded by double quotes (“ ”), that you want displayed in the window's title bar.

·To code an extended bitmap window:

1.Display the topic from which you want to display the bitmap window.

2.Select the text or bitmap reference you want used to activate the bitmap window.

3.From the Format menu, choose Character and select the Double Underline check box, then cancel the selection of the reference.

4.From the Format menu, choose Character again and clear the Double Underline check box, then select the Hidden check box.

5.Type the display-bitmap command, giving the name of the bitmap and the title you want to appear.

6.From the Format menu, choose Character again and clear the Hidden check box.

The following example makes the text “Grand Canyon” the hot spot for the bitmap window entitled "The Grand Canyon" that displays AZ_NICK.DIB:

Grand Canyon!HDisplayBmp(hwndContext, qchPath, "dibs\\az_nick.dib","Grand Canyon")      

Notice that the reference to the bitmap includes the path from the project directory (\VIEWER\USA) to the bitmap (DIBS\AZ_NICK.BMP). Notice also that you must enter a double backslash (\\) for each single backslash (\) in the path. Here's how this would look in the Word topic file: