The above code, I found a problem, it does not support the drag and drop of empty folders ![Huh Huh](https://www.libreautomate.com/forum/images/smilies/huh.png)
The following line of code, I don't understand what it means.
QMDRAGDROPINFO& di=+lParam
I want the edit box to support drag and drop of files, folders (including empty folders),
In addition, how to use the delete key to delete unwanted items in the list box?
I hope someone can provide an example, thank you very much
Macro drag drop
![Huh Huh](https://www.libreautomate.com/forum/images/smilies/huh.png)
The following line of code, I don't understand what it means.
QMDRAGDROPINFO& di=+lParam
I want the edit box to support drag and drop of files, folders (including empty folders),
In addition, how to use the delete key to delete unwanted items in the list box?
I hope someone can provide an example, thank you very much
Macro drag drop
;http://www.quickmacros.com/forum/showthread.php?tid=2702&pid=12511#pid12511
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 ListBox 0x54230101 0x200 0 0 224 62 ""
;4 Edit 0x54030080 0x200 4 72 214 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""
str controls = "3 4"
str lb3 e4
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,QmRegisterDropTarget(id(3 hDlg) hDlg 16)
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_QM_DRAGDROP
,QMDRAGDROPINFO& di=+lParam
,int hlb=id(3 hDlg)
,str s
,foreach s di.files
,,if(dir(s 1)) ;;folder
,,,s+"\*"
,,,Dir d
,,,foreach(d s FE_Dir)
,,,,str sPath=d.FileName(1)
,,,,LB_Add(hlb sPath)
,,else ;;file
,,,LB_Add(hlb s)
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1