Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

DragBitmaps

Defines the drag & drop starting location attribute.

C

BOOL WINAPI SftTree_GetDragBitmaps(HWND hwndCtl);
void WINAPI SftTree_SetDragBitmaps(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetDragBitmaps(HWND hwndCtl);
void WINAPI SftTreeSplit_SetDragBitmaps(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftTree::GetDragBitmaps() const;
void CSftTree::SetDragBitmaps(BOOL fSet = TRUE);
BOOL CSftTreeSplit::GetDragBitmaps() const;
void CSftTreeSplit::SetDragBitmaps(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to enable a drag & drop operation to start from an item picture or label picture, otherwise set to FALSE.

Returns

GetDragBitmaps returns TRUE if a drag & drop operation can start from an item picture or label picture, otherwise FALSE is returned.

Comments

The GetDragBitmaps and SetDragBitmaps functions define the drag & drop starting location attribute.

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

A drag & drop operation can always be started from an item's cells. By using SetDragBitmaps, a drag & drop operation can also be initiated from a picture.

The actual method used to determine when a drag & drop operation is initiated by a user is defined using SetDragType.

Examples

C

                0,                           /* Minimum column width */
              }
            };
            SftTree_SetColumnsEx(m_hwndLeftTree, 1, aCol);/* Set column attributes */
        }

        SftTree_SetShowRowHeader(m_hwndLeftTree, SFTTREE_ROWSTYLE_BUTTONCOUNT0);/* Row style */
        SftTree_SetRowHeaderStyle(m_hwndLeftTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row header style */
        SftTree_SetDragBitmaps(m_hwndLeftTree, TRUE);/* Allow drag & drop from item, label pictures */
        SftTree_SetDragType(m_hwndLeftTree, SFTTREE_DRAG_PIXELIMM);/* Select and move by a number of pixels to start drag */
        SftTree_SetDropHighlightStyle(m_hwndLeftTree, SFTTREE_DROPHIGHLIGHT_BETWEEN);/* Draw line to represent drop target */
        SftTree_SetCharSearchMode(m_hwndLeftTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
        /* Change the default colors */
        {
            SFTTREE_COLORS Colors;
            SftTree_GetCtlColors(m_hwndLeftTree, &Colors);/* Get current color settings */

C++

            0,                           /* Minimum column width */
          }                              
        };
        m_LeftTree.SetColumns(1, aCol);  /* Set column attributes */
    }

    m_LeftTree.SetShowRowHeader(SFTTREE_ROWSTYLE_BUTTONCOUNT0);/* Row style */
    m_LeftTree.SetRowHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row header style */
    m_LeftTree.SetDragBitmaps(TRUE);     /* Allow drag & drop from item, label pictures */
    m_LeftTree.SetDragType(SFTTREE_DRAG_PIXELIMM);/* Select and move by a number of pixels to start drag */
    m_LeftTree.SetDropHighlightStyle(SFTTREE_DROPHIGHLIGHT_BETWEEN);/* Draw line to represent drop target */
    m_LeftTree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
    /* Change the default colors */
    {
        SFTTREE_COLORS Colors;
        m_LeftTree.GetCtlColors(&Colors);/* Get current color settings */

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