Condividi tramite


CImageList::DragEnter

During a drag operation, locks updates to the window specified by pWndLock and displays the drag image at the position specified by point.

static BOOL PASCAL DragEnter( 
   CWnd* pWndLock, 
   CPoint point  
);

Parameters

  • pWndLock
    Pointer to the window that owns the drag image.

  • point
    Position at which to display the drag image. Coordinates are relative to the upper left corner of the window (not the client area).

Return Value

Nonzero if successful; otherwise 0.

Remarks

The coordinates are relative to the window's upper left corner, so you must compensate for the widths of window elements, such as the border, title bar, and menu bar, when specifying the coordinates.

If pWndLock is NULL, this function draws the image in the display context associated with the desktop window, and coordinates are relative to the upper left corner of the screen.

This function locks all other updates to the given window during the drag operation. If you need to do any drawing during a drag operation, such as highlighting the target of a drag-and-drop operation, you can temporarily hide the dragged image by using the CImageList::DragLeave function.

Example

See the example for CImageList::BeginDrag.

Requirements

Header: afxcmn.h

See Also

Reference

CImageList Class

Hierarchy Chart

CImageList::BeginDrag

CImageList::EndDrag

CImageList::DragMove

CImageList::DragLeave