COleClientItem::DoDragDrop

DROPEFFECT DoDragDrop( LPCRECT lpItemRect, CPoint ptOffset, BOOL bIncludeLink = FALSE, DWORD dwEffects = DROPEFFECT_COPY | DROPEFFECT_MOVE, LPCRECT lpRectStartDrag = NULL );

Return Value

A DROPEFFECT value. If it is DROPEFFECT_MOVE, the original data should be removed.

Parameters

lpItemRect

The item’s rectangle on screen in client coordinates (pixels).

ptOffset

The offset from lpItemRect where the mouse position was at the time of the drag.

bIncludeLink

Set this to TRUE if the link data should be copied to the Clipboard. Set it to FALSE if your server application does not support links.

dwEffects

Determines the effects that the drag source will allow in the drag operation.

lpRectStartDrag

Pointer to the rectangle that defines where the drag actually starts. For more information, see the following Remarks section.

Remarks

Call the DoDragDrop member function to perform a drag-and-drop operation. The drag-and-drop operation does not start immediately. It waits until the mouse cursor leaves the rectangle specified by lpRectStartDrag or until a specified number of milliseconds have passed. If lpRectStartDrag is NULL, the size of the rectangle is one pixel.

The delay time is specified by a registry key setting. You can change the delay time by calling CWinApp::WriteProfileString or CWinApp::WriteProfileInt. If you do not specify the delay time, a default value of 200 milliseconds is used. Drag delay time is stored as follows:

For more information about how drag delay information is stored in either the registry or the .INI file, see ::WriteProfileString in the Platform SDK.

COleClientItem OverviewClass MembersHierarchy Chart

See Also   COleDataSource::DoDragDrop, COleClientItem::CopyToClipboard