Microsoft Foundation OLE Classes (mfcole.hlp) (Topic list)
COleClientItem::CreateNewObject
COleClientItem                              Up Contents Index Back
──Microsoft Foundation OLE Classes──────────────────────────────────────────
 
  BOOL CreateNewObject( const char FAR* lpszClass,
                        const char FAR* lpszItemName,
                        OLEOPT_RENDER renderopt = olerender_draw,
                        OLECLIPFORMAT cfFormat = 0 );
 
  Parameter      Description
 
  <lpszClass>    A null-terminated string that specifies the class name of
                 the new OLE client item to create. This string is usually
                 obtained from the global function AfxOleInsertDialog.
 
  <lpszItemName> A null-terminated string that specifies the name of the
                 new OLE client item.
 
  <renderopt>    A variable that specifies how the server will render the
                 item. Must be one of the enumerators listed below:
 
                 Value              Meaning
 
                 olerender_draw     The item is drawn using
                                    COleClientItem::Draw. Thus OLECLI.DLL
                                    obtains and manages the presentation
                                    data and stores the native data for
                                    archiving purposes only.
 
                 olerender_none     OLECLI.DLL does not obtain the
                                    presentation data and does not draw
                                    the object. The client calls
                                    COleClientItem::GetData to retrieve
                                    the server data in native format, and
                                    it is assumed that the client knows
                                    how to interpret this format.
 
                 olerender_format   The client calls
                                    COleClientItem::GetData to retrieve
                                    data in the format specified by
                                    <cfFormat>. The client then uses the
                                    retrieved data to render the item.
 
  <cfFormat>     If <renderopt> is olerender_format, then <cfFormat>
                 specifies the Clipboard data format.
 
  Remarks
 
  Call this function in response to the Insert New Object command on the
  Edit menu. The function creates a new embedded OLE item that is blank
  and has the specified class name.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  AfxOleInsertDialog
 
 
                                     -♦-