在listCtrl或TreeCtrl中都有拖放位图CreateDragImage,那么我在普通视里进行拖放要怎么创建拖放位图呢? 各位帮忙看看了。

解决方案 »

  1.   

    CTreeCtrl::
    CreateDragImage(HTREEITEM hItem)
    hItem 被拖动的树的句柄。
    CListCtrl
    CreateDragImage(int nItem,LPPOINT lpPoint)
    nItem要创建的拖动图像列表的项的下标。
    LpPoint接收图像左上角初始位置的POINT结构的地址
      

  2.   

    IDragSourceHelper::InitializeFromBitmap
      

  3.   

    CMainFrame::OnCreate()
    {
    DragAcceptFiles(GetSafeHwnd(),TRUE);
    }响应WM_DROPFILESWM_DROPFILES
    Sent when the user drops a file on the window of an application that has registered itself as a recipient of dropped files. Syntax WM_DROPFILES 
        hDrop = (HANDLE) wParam; 
    Return Values An application should return zero if it processes this message. Parameters hDrop 
    Handle to an internal structure describing the dropped files. This handle is used by the DragFinish, DragQueryFile, and DragQueryPoint functions to retrieve information about the dropped files. 
    See Also DragAcceptFiles