Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass value in dialog to #sub DlgProc
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
Copy      Help
ARRAY(str) test
test[]="value 1"
test[]="value 2"
test[]="value 3"
test[]="value 4"
test[]="value 5"
test[]="value 6"
test[]="value 7"


Function pass_value_dlg_test
Copy      Help
function ARRAY(str)'arr

;; I do not want to use the below scope variable (thread global 'arr2')
ARRAY(str)- arr2=arr

str dd=
;0 "" 0x90C80AC8 0x0 0 0 224 136 "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
,,;; 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_COMMAND goto messages2
sel wParam
,case IDOK
ret 1

Messages In This Thread
Pass value in dialog to #sub DlgProc - by r0n - 01-07-2020, 05:25 PM
RE: Pass value in dialog to #sub DlgProc - by r0n - 01-07-2020, 07:13 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)