InsertPicture

Description

Inserts a bitmap at the insertion point in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.InsertPicture ( filename )

Argument

Description

rtename

The name of the RichTextEdit control in which you want to insert a picture

filename

A string whose value is the name of the file that contains the bitmap

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If filename is null, InsertPicture returns null.

Usage

If there is a selection, InsertPicture inserts the bitmap at the beginning of the selection. The bitmap and the selection remain selected.

Examples

Example 1

This example inserts a BMP file at the insertion point in the RichTextEdit control rte_1:

integer li_rtn

li_rtn = rte_1.InsertPicture("c:\windows\earth.bmp")

See also