Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog box defines hotkeys
#1
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
Code:
Copy      Help
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


Messages In This Thread
Dialog box defines hotkeys - by Davider - 07-21-2022, 10:35 AM
RE: Dialog box defines hotkeys - by Gintaras - 07-21-2022, 11:16 AM
RE: Dialog box defines hotkeys - by Davider - 07-21-2022, 11:23 AM
RE: Dialog box defines hotkeys - by Davider - 08-05-2022, 08:01 AM
RE: Dialog box defines hotkeys - by Gintaras - 08-05-2022, 05:06 PM
RE: Dialog box defines hotkeys - by Davider - 08-05-2022, 06:58 PM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 04:58 AM
RE: Dialog box defines hotkeys - by Gintaras - 09-05-2022, 05:27 AM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 10:47 AM
RE: Dialog box defines hotkeys - by Gintaras - 09-05-2022, 11:48 AM
RE: Dialog box defines hotkeys - by Davider - 09-05-2022, 10:11 PM

Forum Jump:


Users browsing this thread: 9 Guest(s)