Microsoft Foundation OLE Classes (mfcole.hlp) (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
COleClientItem::CreateFromClipboard
COleClientItem                              Up Contents Index Back
──Microsoft Foundation OLE Classes──────────────────────────────────────────
 
  BOOL CreateFromClipboard( const char FAR* lpszItemName,
                            OLEOPT_RENDER renderopt = olerender_draw,
                            OLECLIPFORMAT cfFormat = 0 );
 
  Parameter      Description
 
  <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 Paste command on the Edit menu to
  create a new embedded OLE item from the contents of the Clipboard. First
  try to create an embedded item using the CreateFromClipboard member
  function. If that fails, use CreateStaticFromClipboard to paste a static
  (metafile-based) item.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  COleClientItem::CreateStaticFromClipboard, COleClientItem::CanPaste
 
 
                                     -♦-