<< Return to Main Index

< Return to Class Index

CGXGridCore::OnDndCacheGlobalData

virtual BOOL OnDndCacheGlobalData(CGXNoOleDataSourceProxy* pSrcItem, const CGXRangeList& selList, ROWCOL& nDndRowExt, ROWCOL& nDndColExt);?

pSrcItem

A proxy object which holds a COleDataSource object.

selList

Holds range list of cells which shall be dragged.

nDndRowExt

A reference to a ROWCOL where the number of copied rows will be returned.

nDndColExt

A reference to a ROWCOL where the number of copied columns will be returned.

Return Value

TRUE if data could be supplied; FALSE if no data were supplied.

Remarks

This overridable is called from DndStartDragDrop to supply the clipboard data for the Drag&Drop operation. You might override this method if you want to add clipboard formats other than CF_TEXT and the internal style clipboard format.

DndStartDragDrop will call OnDndCacheGlobalData to supply the data in CF_TEXT and internal style clipboard format. If you want to add support for additional clipboard formats, you should override OnDndCacheGlobalData.

When you override OnDndCacheGlobalData, you need access to the COleDataSource object to be able to supply data.

Insert the following lines in your code to get a pointer to the COleDataSource object:

COleDataSource* pDataSource =
   ((CGXOleDataSourceProxy*) pSrcItem)->GetOleDataSource();

See Also

CGXGridCore::DndStartDragDrop CGXGridCore::EnableOleDataSource

CGXGridCore

Class Overview | Class Members