Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog => focus out inputfield (trigger code)
#1
How can I "watch" for an "focus out" , out of an input-field?

For example, I have 3 inputfields and I want to trigger code the moment an inputfield loses it's focus.

Function focus_out_test
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages


;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 Static 0x54000000 0x0 6 6 48 10 "A"
;4 Static 0x54000000 0x0 6 40 48 10 "B"
;5 Static 0x54000000 0x0 6 74 48 10 "C"
;6 Edit 0x54030080 0x200 6 18 96 14 "A"
;7 Edit 0x54030080 0x200 6 52 96 14 "B"
;8 Edit 0x54030080 0x200 6 86 96 14 "C"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030604 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

So for example, if a user focuses on one of the inputfields "A" , "B" or "C" and then focuses out of it, a code will be triggered.
#2
Dialog Editor -> Events -> EN_KILLFOCUS.
#3
It was right in front of me!
It works thanks!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)