TE Edit Control Win32 / Win64 Help
Product page

TerInsertOleFile

Insert a file as an OLE object.

int TerInsertOleFile(hWnd, FileName, embed, icon, line, col)
HWND hWnd;Editor window to access
LPBYTE FileName;The name of the file to insert. The file extension is used to select appropriate ole object server.
BOOL embed;Set to TRUE to embed the file, or set to FALSE to create a link to the file.
BOOL icon;Set to TRUE to display the object icon, or set to FALSE to display the contents.
Long line;The text line number to insert the object. Set to -1 to insert the file at the current cursor location.
int col;The text column position to insert the object. This parameter is ignored when the 'line' parameter is set to -1.

Return Value: This function returns the object id of the inserted object. A value of 0 indicates an error condition.