Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

COleClientItem::CreateLinkFromFile

Call this function to create a linked OLE item from a file.

BOOL CreateLinkFromFile( 
   LPCTSTR lpszFileName, 
   OLERENDER render = OLERENDER_DRAW, 
   CLIPFORMAT cfFormat = 0, 
   LPFORMATETC lpFormatEtc = NULL  
);
lpszFileName

Pointer to the name of the file from which the OLE item is to be created.

render

Flag specifying how the server will render the OLE item. For the possible values, see OLERENDER in the Windows SDK.

cfFormat

Specifies the Clipboard data format to be cached when creating the OLE item.

lpFormatEtc

Pointer to a FORMATETC structure used if render is OLERENDER_FORMAT or OLERENDER_DRAW. Provide a value for this parameter only if you want to specify additional format information beyond the Clipboard format specified by cfFormat. If you omit this parameter, default values are used for the other fields in the FORMATETC structure.

Nonzero if successful; otherwise 0.

The framework calls this function if the user chooses OK from the Insert Object dialog box when the Create from File button is selected and the Link check box is checked. It is called from COleInsertDialog::CreateItem.

For more information, see OleCreateLinkToFile, OLERENDER, and FORMATETC in the Windows SDK.

Header: afxole.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.