09-03-2012, 06:17 AM
Infinite loop. Somehow it breaks, not allowing to hang.
key should never be used in a dialog or window procedure to send keys to the window. Especially if it is a hotkey like here. If not hotkey, can use, but with opt keysync 1 and with SetFocus.
Function SESInputDialog
key should never be used in a dialog or window procedure to send keys to the window. Especially if it is a hotkey like here. If not hotkey, can use, but with opt keysync 1 and with SetFocus.
Function SESInputDialog
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;Get help in : DialogWithMenu
str controls = "3"
str e3
if(!ShowDialog("SESInputDialog" &SESInputDialog &controls 0 0 0 0 0 0 0 "$user profile$\My Documents\Local Settings\sysman\Ico\SESGroup1.ICO" "SESInputDialog")) ret
mes e3
;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 382 172 "SES-Multiline Input"
;3 Edit 0x54231044 0x200 0 0 382 194 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030307 "*" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,__Font-- f
,f.Create("Tahoma" 11 0)
,f.SetDialogFont(hDlg "3")
,
,case WM_SIZE
,RECT r; GetClientRect(hDlg &r)
,siz r.right r.bottom id(3 hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,;menu items:
,case 106 DT_Ok hDlg
,
,case 103
,;key Cc ;;this would send Ctrl+C, it would send command 103, and so on. Endless loop.
,SendMessage id(3 hDlg) WM_COPY 0 0
,
,case 105
,SendMessage id(3 hDlg) WM_PASTE 0 0
,
,case 104
,SendMessage id(3 hDlg) EM_SETSEL 0 -1
,
,case IDOK
,case IDCANCEL
ret 1
;BEGIN MENU
;>&Edit
,;&Copy : 103 0 0 Cc
,;-
,;&Paste : 105 0 0 Cv
,;-
,;Select &All : 104 0 0 Ca
,;<
;E&xit : 106 0
;END MENU