TE Edit Control Win32 / Win64 Help
Product page

TerInsertDrawObject

Insert a drawing object.

int TerInsertDrawObject(hWnd, type, x, y, width, height)
HWND hWnd;Editor window to access
int type;Drawing object type:
DOB_TEXT_BOX:A box containing text
DOB_RECT:A rectangle
DOB_LINE:A horizontal line. To draw other than a horizontal line, please use the TerInsertLineObject function instead.
int x;X location of the frame rectangle specified in the Twips unit. The x location is relative to the left margin of the page. Specify -1 to assume the current cursor position for the x value.
int y;Y position of the frame rectangle specified in the Twips unit. The Y position is relative to the beginning of the current paragraph. Specify -1 to assume the current cursor position for the y value.
int width;Initial width of the frame rectangle in the Twips unit. Specify -1 to use the default value.
int height;Initial height of the frame rectangle in the Twips unit. Specify -1 to use the default value.

Description: This function creates a specified drawing object.

Return Value: When successful this function returns the paragraph frame id of the new object. Otherwise it returns 0.