Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog with Muti Text Boxes on change
#3
this is much simpler 
 
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 202 100 "Dialog" "4"
;3 Static 0x54000000 0x0 10 15 48 12 "field 1"
;4 Edit 0x54030080 0x200 60 15 96 12 ""
;5 Static 0x54000000 0x0 10 35 48 12 "field 2"
;6 Edit 0x54030080 0x200 60 35 96 12 ""
;7 Static 0x54000000 0x4 10 55 48 12 "field 3"
;8 Edit 0x54030080 0x204 60 55 96 13 ""
;9 Edit 0x54030080 0x200 10 75 146 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

str controls = "4 6 8 9"
str e4 e6 e8 e9
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc v;; must have v attribute
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [EN_CHANGE<<16|4,EN_CHANGE<<16|6,EN_CHANGE<<16|8]
,DT_GetControls(hDlg)
,_s=F"{e4},{e6},{e8}"
,;; e4,e6,e8 are  variables created by dialog editor as shown in this line "str e4 e6 e8 e9" above and need to be changed to match your dialog variables
,DT_SetControl(hDlg 9 _s)

ret 1


Messages In This Thread
Dialog with Muti Text Boxes on change - by Firas - 06-18-2020, 09:51 AM
RE: Dialog with Muti Text Boxes on change - by Kevin - 06-18-2020, 05:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)