Freigeben über


COleDataSource::DelaySetData

Call this function to support changing the contents of the data source.

void DelaySetData(
   CLIPFORMAT cfFormat,
   LPFORMATETC lpFormatEtc = NULL 
);

Parameters

  • cfFormat
    The Clipboard format in which the data is to be placed. This parameter can be one of the predefined Clipboard formats or the value returned by the native Windows RegisterClipboardFormat function.

  • lpFormatEtc
    Points to a FORMATETC structure describing the format in which the data is to be replaced. Provide a value for this parameter if you want to specify additional format information beyond the Clipboard format specified by cfFormat. If it is NULL, default values are used for the other fields in the FORMATETC structure.

Remarks

OnSetData will be called by the framework when this happens. This is only used when the framework returns the data source from COleServerItem::GetDataSource. If DelaySetData is not called, your OnSetData function will never be called. DelaySetData should be called for each Clipboard or FORMATETC format you support.

For more information, see the FORMATETC structure in the Windows SDK*.*

For more information, see RegisterClipboardFormat in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleDataSource Class

Hierarchy Chart

COleServerItem::GetDataSource

COleDataSource::OnSetData

Other Resources

COleDataSource Members