Object Linking and Embedding (OLE):
OLE is technology developed
by Microsoft that allows embedding and linking to documents and other objects.
It links as well as embeds some elements from other application.
For ex: We can embed a
spread sheet from excel in the word document. We can get picture from MS paint
in the MS word.
OLE Drag and Drop:
OLE means transfer of data
from source to destination hence for OLE drag and drop operations
There are three things that are required –
1. An
Interface IDropSource.
2. An
Interface IDropTarget.
3. Some
library code that manage the drag and drop process.
·
Drag and Drop operation is similar
to copy and paste operation.
·
The Drag and Drop is performed
between two applications or between an application and the window.
·
When user start the drag, cursor
change and turn into the “+” sign. If we are dropping some object on the target
then the object gets copied on the target.
·
Source
Side: There is a key function executed in drag and drop
process that is DoDragDrop(). The task of this function is to create an object
of class ColeDropSource. The DoDragDrop() function is a looping function which
does not return anything for some time. It returns only when user performs the
drop operation or user cancels the operation or when some period of time is
completed. The DoDragDrop() function is called when user click the mouse inside
the tracking rectangle.
·
Destination
Side: At this side, the dragged object must be dropped on
some target. There is a target class named ColeDropTarget which implements
IDropTarget interface. This interface holds the IDropSource pointer which
finally link to ColeDropSource object.
0 comments:
Post a Comment