VpeWriteRTF

<< Click to Display Table of Contents >>

Navigation:  RTF Functions >

VpeWriteRTF

Previous pageReturn to chapter overviewNext page

Outputs RTF text within a rectangle at position x, y, with the right border at x2 and the bottom border at y2.

The pen is invisible.

VpeCoord VpeWriteRTF(

VpeHandle hDoc,

VpeCoord x,

VpeCoord y,

VpeCoord x2,

VpeCoord y2,

LPCSTR rtf_text

)

VpeHandle hDoc

Document Handle

VpeCoord x, y, x2, y2

position and dimensions

LPCSTR rtf_text

the string to output

Returns:

the bottom y-coordinate generated by the output

Remarks:

VFREE: only the y2 coordinate may be set to VFREE, not x2.

 

In case of an error, LastError is set.

 

VPE offers several methods to attach an object's position to margins and relative to the position of previously inserted objects. In addition Text, Rich Text and Picture objects are able to compute their dimensions automatically depending on their visual content.
For details please see "Dynamic Positioning" in the Programmer's Manual.

Example:

VpeSetFont(hDoc, "Arial", 12)

VpeWriteRTF(hDoc, 1, 1, -5, VFREE, "Hello \b World!")

VpeSetFont(hDoc, "Times New Roman", 16)

VpeSetUnderlined(hDoc, TRUE)

VpeWriteRTF(VLEFT, VBOTTOM, VRIGHT, VFREE, "Hello \b World!")

Produces the following output:

Hello World!

Hello World!

 

See also:

"RTF - Rich Text Format" in the Programmer's Manual