Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ARRAY Help
#4
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 107 103 "TEST DIALOG"
;1 Button 0x54030001 0x4 6 88 48 14 "OK"
;2 Button 0x54030000 0x4 54 88 48 14 "Cancel"
;3 Edit 0x54030080 0x200 6 4 96 14 ""
;4 Edit 0x54030080 0x200 6 20 96 14 ""
;5 Edit 0x54030080 0x200 6 36 96 14 ""
;6 Edit 0x54030080 0x200 6 52 96 14 ""
;7 Edit 0x54030080 0x200 6 68 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""


str controls = "3 4 5 6 7"
str e3 e4 e5 e6 e7
if(!ShowDialog("Dialog4" &Dialog4 &controls)) ret

ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ARRAY(str)+ g_aacc.create(5)
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,,g_aacc[0].getwintext(id(3 hDlg))
,,g_aacc[1].getwintext(id(4 hDlg))
,,g_aacc[2].getwintext(id(5 hDlg))
,,g_aacc[3].getwintext(id(6 hDlg))
,,g_aacc[4].getwintext(id(7 hDlg))
,,mac "EXAMPLE"
,,DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1

Code:
Copy      Help
int i
for i 0 g_aacc.len
,str& s=g_aacc[i]
,if(!s.len) continue
,;code here
,;code here
,;code here
,;in the code, replace acc1, acc2 and others to s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)