Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Let all editbox support drag and drop files and texts
#15
code to change font included
Function Function414
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x8 0 0 352 220 "Dialog" "4"
;3 Edit 0x54231044 0x200 12 8 330 180""
;1 Button 0x54030001 0x4 244 196 48 14 "OK"
;2 Button 0x54030000 0x4 300 196 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

str controls = "3"
str e3
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 0)
,__Font f.Create("Tahoma" 18 0)
,f.SetDialogFont(hDlg "3")
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_QM_DRAGDROP
,QMDRAGDROPINFO& di=+lParam
,sel wParam
,,case 3 ;;drop
,,str s
,,if(!di.GetText(s 1)) s=di.files ;;
,,s.setsel(0 di.hwndTarget)
,,ret DT_Ret(hDlg 1)
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
RE: Let all editbox support drag and drop files and texts - by Kevin - 01-17-2021, 03:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)