Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

DragImage

Returns a drag image representing the currently selected items.

C

HBITMAP WINAPI SftTree_GetDragImage(HWND hwndCtl,
        int index,
        LPRECT lpRect,
        COLORREF *lpColorBg);
HBITMAP WINAPI SftTreeSplit_GetDragImage(HWND hwndCtl,
        int index,
        LPRECT lpRect,
        COLORREF *lpColorBg);

C++

HBITMAP CSftTree::GetDragImage(HWND hwndCtl,
        int index,
        LPRECT lpRect,
        COLORREF *lpColorBg) const;
HBITMAP CSftTreeSplit::GetDragImage(HWND hwndCtl,
        int index,
        LPRECT lpRect,
        COLORREF *lpColorBg) const;

Parameters

hwndCtl

The window handle of the tree control.

index

The zero-based index of the item where dragging originated (one of possibly many items). In the current version of the product, this index is not used, but is validated. It is reserved for future expansion.

lpRect

Returns the bitmap dimensions and position, based on the currently selected item(s).

lpColorBg

Returns the background color of the tree control. This parameter may be NULL.

Returns

GetDragImage returns a bitmap handle representing the currently selected item(s).

Comments

The GetDragImage function returns a drag image representing the currently selected items.

The returned bitmap handle is owned by the application and must be destroyed using the Windows DeleteObject function.

This drag image can be used with the IDropTargetHelper and IDragSourceHelper interfaces to provide a translucent drag image. IDropTargetHelper and IDragSourceHelper interfaces are provided by the Windows Shell starting with Windows 2000 and Windows ME. SftTree/DLL has no built-in support for OLE drag & drop or translucent drag images, as these functions are normally controlled by the application or framework, not by an individual control.

See Also C/C++ API | Categories | Notifications