What is OLE ? How do you handle drag and drop in OLE ?

 
 

Object Linking and Embedding (OLE) clipboard is a more capable clipboard than the windows traditional clipboard. To transfer a large image using a legacy clipboard one must allocate enough memory space to copy this image. However using the OLE clipboard you can transfer the bitmap in a more sensible medium like a file on a hard disk.
OLE drag and drop is a visual method of transferring data. Unlike having separate commands like cut, copy and paste the OLE drag and drop lets you grab a piece of data with the mouse and drop it in the desired location.
So to summarize it there are two broad differences between OLE and legacy clipboard. OLE clipboard is completely COM based and secondly it supports storage medium other than global memory.
OLE drag and drop is programmatically very similar to OLE clipboard. The data provider or data source creates a data object that encapsulates the data and makes an IDataObject pointer available. The data consumer or drop target retrieves the IDataObject and uses it to extract data from the data object. The drop source initiates a drag and drop operation by passing an IDataObject pointer to ::DoDragDrop. Any window that is interested inbeing a drop target registers itself with the system by calling ::RegisterDragDrop. If drop occurs in a registered window then the drop target is handed the IDataObject pointer passed to ::DoDragDrop.