Share via


CDragListBox::BeginDrag

Called by the framework when an event occurs that could begin a drag operation, such as pressing the left mouse button.

virtual BOOL BeginDrag( 
   CPoint pt  
);

Parameters

  • pt
    A CPoint object that contains the coordinates of the item being dragged.

Return Value

Nonzero if dragging is allowed, otherwise 0.

Remarks

Override this function if you want to control what happens when a drag operation begins. The default implementation captures the mouse and stays in drag mode until the user clicks the left or right mouse button or presses ESC, at which time the drag operation is canceled.

Requirements

Header: afxcmn.h

See Also

Reference

CDragListBox Class

Hierarchy Chart

CDragListBox::CancelDrag

CDragListBox::Dragging