02-05-2015, 08:35 AM
I would appreciate any assistance in the following issue : Is it possible to get and process the signal from IDCANCEL button before that of EN_KILLFOCUS in the dialogue which it follows ? If this is not possible is it possible that EN_KILLFOCUS procedure checks and/or somehow is signaled that there has also been issued a IDCANCEL signal. It is obvious that I need IDCANCEL signal to have the first priority.
Function Dialog24
As a matter of fact I have given the following solution, which satisfies my needs :
Function Dialog24
Neverthless, any further advice is mostly welcome.
Function Dialog24
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Edit 0x54030080 0x200 62 16 96 12 ""
;4 Edit 0x54030080 0x200 64 52 96 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""
str controls = "3 4"
str e3 e4
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,out "cancel"
,case EN_KILLFOCUS<<16|3
,out "KillFocus"
ret 1
As a matter of fact I have given the following solution, which satisfies my needs :
Function Dialog24
,case EN_KILLFOCUS<<16|3
,Acc a=acc()
,if StrCompare(a.Name "Cancel")=0; out "Cancel clicked"
,_s.getwintext(id(3 hDlg))
Neverthless, any further advice is mostly welcome.