Hello everyone
I defined a hotkey in the dialog box, Ctrl+q, add or remove # use for The line where the cursor is located, but it only has an effect on the first line
Thanks for any advice and help
david
Macro Macro5
I defined a hotkey in the dialog box, Ctrl+q, add or remove # use for The line where the cursor is located, but it only has an effect on the first line
Thanks for any advice and help
david
Macro Macro5
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Edit 0x54031084 0x200 8 8 204 94 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
str controls = "3"
str e3
e3=
;ABC
;#DEF
;GHI
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,DT_SetAccelerators(hDlg "401 Cq")
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 401
,act id(3 hDlg)
,key E SH
,_s.getsel
,if _s.beg("#")
,,_s.findreplace("#" "" 4)
,,_s.setsel
,else
,,_s.ltrim
,,_s-"#"
,,_s.setsel