TE Edit Control Win32 / Win64 Help
Product page

TerPastePicture

Paste a picture from the buffer or clipboard.

int TerPastePicture(hWnd, format, hData, ParaFrameId, align, insert)
HWND hWnd;Handle of the window to be accessed
UINT format;Picture format:
CF_DIB:Device independent bitmap format
CF_BITMAP:Bitmap format
CF_METAFILEPICT:Metafile picture format
CF_ENHMETAFILE:
Enhanced metafile picture (win32)
HGLOBAL hData;picture data. The hData value for the supported picture formats should be specified as following:
CF_DIB:Global memory handle containing the DIB picture header and picture data.
CF_BITMAP:Bitmap handle
CF_METAFILEPICT:Global memory handle containing the clipboard metafile header and metafile data.
CF_ENHMETAFILE:Enhanced metafile handle.
int ParaFrameId;Id of the frame to insert the picture into. Set 0 for default.
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.

Description: This function pastes a picture contained in the hData global memory handle. If the hData argument is NULL, the picture is retrieved from the clipboard. When the 'insert' argument is TRUE, the picture is inserted at the current cursor location.

Return Value: This function returns a non-zero picture id, if successful. Otherwise it returns zero.