TerInsertPictureFile
Embed or link a bitmap or a metafile from a disk file.
int TerInsertPictureFile(hWnd, FileName, embed, align, insert)
int TerInsertPictureFileXY(hWnd, FileName, embed, align, insert, x, y)
int TerInsertPictureFileXY2(hWnd, FileName, embed, align, insert, PageRelative x2, y2)
int TerInsertPictureFileU(hWnd, FileNameW, embed, align, insert)
HWND hWnd; | The handle of the window to be accessed |
LPBYTE FileName; | Name of the disk image file. |
LPWORD FileNameW; | Name of the unicode disk image file. This parameter is used by the TerInsertPictureFileU method only. |
BOOL embed; | TRUE to embed the picture in the document file, FALSE to create a link to the picture file. |
int align; | picture alignment relative to the baseline of the text: ALIGN_BOT (default), ALIGN_TOP, ALIGN_MIDDLE. |
BOOL insert; | TRUE to insert the picture into text. FALSE to simply return the picture id without inserting the picture into text. |
int x; | Pixel X position relative to the client-window to insert the picture. This parameter is used by the TerInsertPictureFileXY method only. |
int y; | Pixel Y position relative to the client-windo to insert the picture. This parameter is used by the TerInsertPictureFileXY method only. |
BOOL PageRelative; | Set to TRUE to interpret the values of the x2 and y2 relative to the top of the page. Set to FALSE to insert a paragraph-relative picture. |
int x2 | When PageRelative parameter is set to TRUE: specify the x position in twips unit relative to the left edge of the page. When PageRelative parameter is set to FALSE; specify the x position in twips unit relative to the left margin of the page. This parameter is used by the TerInsertPictureFileXY2 method only. |
int y2 | When PageRelative parameter is set to TRUE: specify the y position in twips unit relative to the top edge of the page. When PageRelative parameter is set to FALSE; specify the y position in twips unit relative to the current paragraph. This parameter is used by the TerInsertPictureFileXY2 method only. |
Description: A file selection dialog box is displayed if the FileName argument is set to NULL. The TerInsertPictureFile function inserts the picture at the current text position. The TerInsertPictureFileXY function inserts the picture at the pixel location given by the x,y position. The x,y pixel location is relative to the top left corner of the client area of the window. The TerInsertPictureFileXY2 method is used to insert a page or paragraph relative picture.
Return Value: This function returns a non-zero picture id, if successful. Otherwise it returns zero.