Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize


Call this function to create an embedded item; this function launches the server application that allows the user to create the OLE item.

BOOL CreateNewItem(
   REFCLSID clsid,
   CLIPFORMAT cfFormat = 0,
   LPFORMATETC lpFormatEtc = NULL 


ID that uniquely identifies the type of OLE item to create.
Flag specifying how the server will render the OLE item. For the possible values, see OLERENDER in the Platform SDK.
Specifies the Clipboard data format to be cached when creating the OLE item.
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.

Return Value

Nonzero if successful; otherwise 0.


The framework calls this function if the user chooses OK from the Insert Object dialog box when the Create New button is selected.

For more information, see OleCreate, OLERENDER, and FORMATETC in the Platform SDK.

See Also

COleClientItem Overview | Class Members | Hierarchy Chart | COleInsertDialog::CreateItem

© 2015 Microsoft