COleControl::GetWindowlessDropTarget

virtual IDropTarget* GetWindowlessDropTarget( );

Return Value

Pointer to the object's IDropTarget interface. Since it does not have a window, a windowless object cannot register an IDropTarget interface. However, to participate in drag and drop, a windowless object can still implement the interface and return it in GetWindowlessDropTarget.

Remarks

Override GetWindowlessDropTarget when you want a windowless control to be the target of an OLE drag and drop operation. Normally, this would require that the control’s window be registered as a drop target. But since the control has no window of its own, the container will use its own window as a drop target. The control simply needs to provide an implementation of the IDropTarget interface to which the container can delegate calls at the appropriate time. For example:

IDropTarget* CMyCtrl::GetWindowlessDropTarget()
{
    m_xDropTarget.AddRef();
    return &m_xDropTarget;
}

COleControl OverviewClass MembersHierarchy Chart