Embedded Windows

Embedded windows display objects in a window embedded in a Viewer topic. Standard embedded windows can display bitmaps (up to 256 colors), play animation sequences, or display controls for playing audio segments. Authors can also write their own DLLs to render multimedia elements in an embedded window. (See Chapter 14, “Writing DLLs for the Multimedia Viewer,” for more information.)

This section describes the general RTF form used for embedded windows. Later sections show the RTF entries for the standard embedded window types (bitmap, audio, and animation) defined by Viewer.

RTF format

An RTF entry for an embedded window has the following syntax:

\{ew[c, l, r] DLL-name, window-class, author-data\}

Window References

The ewc, ewl, and ewr references insert embedded windows in a topic. These commands align the embedded window in the topic in much the same way as the bmc, bwl, and bwr commands:

ewc

Positions the embedded window using character alignment. The window is treated as if it were another character and it appears at the position in the line indicated by the reference. Text follows the window, positioned at the base of the window.

ewl

Positions the embedded window along the left margin, with text wrapping automatically along the right edge of the image.

ewr

Positions the window along the right margin, with text to its left.

In the Title

Embedded windows are displayed much the same as the bitmaps shown in “Bitmaps
(16 Colors),” earlier in this chapter.

Parameters

DLL-name

Filename of the DLL rendering the object in the window. This name should not have an extension, but it can have a relative path.

window-class

Window-class name for the embedded window as defined in the C source file for the DLL.

author-data

A programmer-defined string passed to the DLL (in the WM_CREATE message) when Viewer creates the window.