01-16-2021, 03:59 AM
@Kevin
Add multi paragraph text, achieved by dragging?
Now The text I drag the second time will replace the text I drag the first time
It will be more convenient if can drag and drop some texts for many times
In addition, now press enter in the edit box to create a new line, which will close the dialog box
Macro Macro4
Add multi paragraph text, achieved by dragging?
Now The text I drag the second time will replace the text I drag the first time
It will be more convenient if can drag and drop some texts for many times
In addition, now press enter in the edit box to create a new line, which will close the dialog box
Macro Macro4
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x8 0 0 352 220 "Dialog" "4"
;3 Edit 0x54030084 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: "" 0x2040B01 "*" "" "" ""
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)
,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(sd 1)) ret ;;
,,if(!di.GetText(s 1)) s=di.files ;;
,,s.setwintext(di.hwndTarget)
,,ret DT_Ret(hDlg 1)
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1