Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Very easy question...
#1
I want to output the result of TEST2 to control 3 of TEST1

I tried to find a way but I don't know...


Function TEST2
Code:
Copy      Help
\Dialog_Editorstr dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;11 ListBox 0x54230109 0x200 16 20 72 32 "Multi-selection" "Multi-selection listbox"
;3 Button 0x54032000 0x0 124 24 48 14 "Button"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""str controls = "11"
str lb3lb3="Zero[]&One[]&Two"if(!ShowDialog(dd 0 &controls)) retout "ListBox2:"; int i; for(i 0 lb3.len) if(lb3[i]='1') out i

 Function TEST1
Code:
Copy      Help
\Dialog_Editorstr dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 ListBox 0x54230109 0x200 8 12 96 48 ""
;4 Button 0x54032000 0x0 124 16 48 14 "Button"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""str controls = "3"
str lb3="Zero[]&One[]&Two"
str+ aa=lb3
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
str u
sel wParam
,case 4
,case IDOK
,case IDCANCEL
,case LBN_SELCHANGE<<16|3
,out ""
ret 1
#2
Solved
Function TEST1
Code:
Copy      Help
\Dialog_Editorstr dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 ListBox 0x54230109 0x200 8 12 96 48 ""
;4 Button 0x54032000 0x0 124 16 48 14 "Button"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""str controls = "3"
str lb3="Zero[]One[]Two"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,out
,str Selected_Item
,for _i 0 LB_GetCount(id(3 hDlg))
,,if(SendMessage(id(3 hDlg) LB_GETSEL _i 0) = 1)
,,,LB_GetItemText id(3 hDlg) _i &Selected_Item
,,,out "%s is selected" Selected_Item,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)