Viewer allows you to position hot spots that copy a bitmap from an embedded window to the Windows Clipboard.
Hot spots that copy bitmaps look the same as other hot spots in the title.
The copy bitmap command has the following parts:
A word, phrase, or bitmap formatted as double-underline text that serves as the activation point for the command
The copy-bitmap command formatted as hidden text
The following example shows how this might look in the topic file:
!CopyBmp(hwndContext, qchPath, "dibs\\az_bird.dib")
{\uldb \{hot-spot text\}}{\v !CopyBmp(hwndContext,qchPath,"[!]bitmapfile"}
hot-spot text
Hot-spot text or reference to a hot bitmap in the topic. When the user clicks this text or bitmap, Viewer copies the bitmap given by bitmapfile to the Windows Clipboard. See “Bitmaps (16 Colors),” earlier in this chapter, for more information on coding for bitmap references.
bitmapfile
Name of the file containing the bitmap.
If this filename does not have an exclamation point (!) prefix, the filename should include the path from the project directory to the bitmap.
If this filename has an exclamation point (!) prefix, the bitmap data is located within the .MVB file for the Viewer title, and the [BAGGAGE] section of the project file must list a reference to this file. (See the description of the [BAGGAGE] section in Chapter 17, “Project File Format,” for more information.)
Any backslashes in the path must be escaped with a backslash (\). That is, “\” in the path must appear as “\\”.
If a title contains copy-bitmap commands, the following entry appears in the [CONFIG] section of the title's project file:
[CONFIG]
RegisterRoutine("mvbmp", "CopyBmp", "v=USS")
Only one entry appears in the project file, even if the title has more than one copy bitmap command.
The following example makes the reference bitmap USCLIP.BMP the hot spot for a command that copies the bitmap AZ_BIRD.DIB to the Windows Clipboard:
{\uldb \bmc usclip.bmp\}}{\v !CopyBmp(hwndContext, qchPath, "dibs\\\\az_bird.dib")}
Notice that the referenced bitmap file includes the path from the project directory.