01-07-2020, 05:25 PM
Sorry for this akward simple question...
Below in "pass_value_dlg_test_calldlg_and_pass_value" I call the dialog "pass_value_dlg_test".
Is it possible to pass 'arr' into "#sub DlgProc" without using any scope related variables?
Function pass_value_dlg_test_calldlg_and_pass_value
Function pass_value_dlg_test
Below in "pass_value_dlg_test_calldlg_and_pass_value" I call the dialog "pass_value_dlg_test".
Is it possible to pass 'arr' into "#sub DlgProc" without using any scope related variables?
Function pass_value_dlg_test_calldlg_and_pass_value
ARRAY(str) test
test[]="value 1"
test[]="value 2"
test[]="value 3"
test[]="value 4"
test[]="value 5"
test[]="value 6"
test[]="value 7"
pass_value_dlg_test(test)
Function pass_value_dlg_test
function ARRAY(str)'arr
;; I do not want to use the below scope variable (thread global 'arr2')
ARRAY(str)- arr2=arr
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret ;; <==== possible to pass 'arr' through here?
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,,;; I could place 'arr2' here but I do NOT want to use this method if possible
,,ARRAY(str)- arr2
,,int j
,,for j 0 arr2.len
,,,out arr2[j]
,,,
,,;; What I want is to output arr here WITHOUT using any scope related variables (global/static/thread)
,,;; It needs to get pass into 'DlgProc', is this possible? (how to do if possible...)
,,int i
,,for i 0 arr.len
,,,out arr[i]
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1