Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Let all editbox support drag and drop files and texts
#1
hello everyone,

The following code, the first editbox, only supports drag and drop files

1.How to quickly make all editbox support drag and drop operation?

2.How to make all editbox support drag and drop texts?


complicated to implement? This is a very useful function. Thanks in advance

Macro Macro9
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Edit 0x54030080 0x200 8 8 96 12 ""
;4 Edit 0x54030080 0x200 8 28 96 13 ""
;5 Edit 0x54030080 0x200 8 48 96 12 ""
;6 Edit 0x54030080 0x200 8 68 96 13 ""
;7 Edit 0x54030080 0x200 8 88 96 12 ""
;8 Edit 0x54030080 0x200 120 8 96 12 ""
;9 Edit 0x54030080 0x200 120 28 96 13 ""
;10 Edit 0x54030080 0x200 120 48 96 12 ""
;11 Edit 0x54030080 0x200 120 68 96 13 ""
;12 Edit 0x54030080 0x200 120 88 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

str controls = "3 4 5 6 7 8 9 10 11 12"
str e3 e4 e5 e6 e7 e8 e9 e10 e11 e12
if(!ShowDialog(dd &sub.DlgProc &controls)) ret

out e3

#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=di.files
,s.setwintext(hlb)
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
Let all editbox support drag and drop files and texts - by macman - 01-04-2021, 08:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)