SftTree/DLL 6.5

DragType

Softel vdm, Inc.

Defines the drag & drop detection attribute.

C

int WINAPI SftTree_GetDragType(HWND hwndCtl);
void WINAPI SftTree_SetDragType(HWND hwndCtl, int dragType);
int WINAPI SftTreeSplit_GetDragType(HWND hwndCtl);
void WINAPI SftTreeSplit_SetDragType(HWND hwndCtl, int dragType);

C++

int CSftTree::GetDragType() const;
void CSftTree::SetDragType(int dragType);
int CSftTreeSplit::GetDragType() const;
void CSftTreeSplit::SetDragType(int dragType);

Parameters

hwndCtl

The window handle of the tree control.

dragType

A value describing the drag & drop detection method used:

SFTTREE_DRAG_LEAVE

The drag & drop operation can start from a cell and is initiated once the mouse cursor leaves the current item.  Before an item can be dragged, it has to be selected using the keyboard or the mouse button and the mouse button has to be released, then a drag & drop operation can be started by pressing the mouse button again.

SFTTREE_DRAG_LEAVEIMM

The drag & drop operation can start from a cell and is initiated once the mouse cursor leaves the current item. An item can be dragged as it is selected in a single selection tree control (see SFTTREESTYLE_MULTIPLESEL).  In a multiple-selection tree, an item has to be selected before it can be dragged (identical to SFTTREE_DRAG_LEAVE).

SFTTREE_DRAG_LEAVEIMM2

The drag & drop operation can start from a cell and is initiated once the mouse cursor leaves the current item.  An item can be dragged as it is selected in both a single and multiple selection tree control (see SFTTREESTYLE_MULTIPLESEL).

SFTTREE_DRAG_PIXEL

The drag & drop operation can start from a cell and is initiated once the mouse cursor is moved by a certain pixel distance.  Before an item can be dragged, it has to be selected using the keyboard or the mouse button and the mouse button has to be released, then a drag & drop operation can be started by pressing the mouse button again.

SFTTREE_DRAG_PIXELIMM

The drag & drop operation can start from a cell and is initiated once the mouse cursor is moved by a certain pixel distance.  An item can be dragged as it is selected in a single selection tree control (see SFTTREESTYLE_MULTIPLESEL).  In a multiple-selection tree, an item has to be selected before it can be dragged (identical to SFTTREE_DRAG_PIXEL).

SFTTREE_DRAG_PIXELIMM2

The drag & drop operation can start from a cell and is initiated once the mouse cursor is moved by a certain pixel distance.  An item can be dragged as it is selected in both a single and multiple selection tree control (see SFTTREESTYLE_MULTIPLESEL).

Returns

GetDragType returns a value indicating the current drag & drop detection method used.

Comments

The GetDragType and SetDragType functions define the drag & drop detection attribute.

A tree control must be defined using the SFTTREESTYLE_DRAGDROP window style to support drag & drop.

SetDragType determines when the SFTTREEN_BEGINDRAG notification is generated to notify the application that a drag & drop operation has been initiated by the user.

A drag & drop operation always starts at the current location described by GetCaretIndex.  It is the application's responsibility to visually implement the drag & drop operation.

Depending on SetDragBitmaps, dragging can start on the cell only or also on the label and item pictures.

With some type values, a drag and drop operation starts once the user moves the mouse cursor by a certain pixel distance.  The pixel distance used is retrieved by using the Windows API GetSystemMetrics(SM_CX/Y/DRAG).

The settings of the RubberbandSelection property affects may affect the drag & drop detection.

See Also  C/C++ API  |  CategoriesNotifications

 


Feedback / comments / error reports for this topic
© 2009 - Softel vdm, Inc. - www.softelvdm.com