Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog help
#5
Like this?

Function Dialog10
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3 4"
str cb3 = "Rental House Income Jan 09[]Rental House Income Feb 09[]Rental House Income Mar 09[]Gas Charges Jan 09[]Gas Charges Feb 09[]Gas Charges Mar 09[]funds for year 2009 home[]funds for year 2009 office[]reports for sales of 2009[]reports for sale of 2008"
str lb4 = "Rental House Income Jan 09[]Rental House Income Feb 09[]Rental House Income Mar 09[]Gas Charges Jan 09[]Gas Charges Feb 09[]Gas Charges Mar 09[]funds for year 2009 home[]funds for year 2009 office[]reports for sales of 2009[]reports for sale of 2008"
if(!ShowDialog("Dialog10" &Dialog10 &controls)) ret   ;;*****Change where it says "Dialog10" to whatever this dialog is named
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 253 151 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ComboBox 0x54230243 0x0 12 80 96 213 ""
;4 ListBox 0x54230101 0x200 12 18 124 46 ""
;5 Button 0x54032000 0x0 140 22 48 14 "GetSelected"
;END DIALOG
;DIALOG EDITOR: "" 0x203000B "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_SELENDOK<<16|3
,_i=CB_SelectedItem(lParam)
,out _i
,str whichone
,CB_GetItemText(lParam _i &whichone)
,mes whichone
,
,sel _i
,,case 0 run "$desktop$\New Folder\New Text Document.txt"
,,case 1 run "$desktop$\New Folder\New Text Document (4).txt"
,,case 2 run "$desktop$\New Folder\t.txt"
,,case 3 run "$desktop$\New Folder\t1.txt"
,,case 4 run "$desktop$\New Folder\t54.txt"
,,case 5 run "$desktop$\New Folder\t7.txt"
,,case 6 run "$desktop$\New Folder\45t.txt"
,,case 7 run "$desktop$\New Folder\t55.txt"
,,case 8 run "$desktop$\New Folder\555t.txt"
,,case 9 run "$desktop$\New Folder\5555t.txt"
,,case else ret
,
,case 5     ;;5 = id of check button
,,str itemtext
,,int itemnumber = LB_SelectedItem(id(4) &itemtext)     ;;4 = id of list box
,,mes itemtext
,,
,,sel itemnumber
,,,case 0 run "$desktop$\New Folder\New Text Document.txt"
,,,case 1 run "$desktop$\New Folder\New Text Document (4).txt"
,,,case 2 run "$desktop$\New Folder\t.txt"
,,,case 3 run "$desktop$\New Folder\t1.txt"
,,,case 4 run "$desktop$\New Folder\t54.txt"
,,,case 5 run "$desktop$\New Folder\t7.txt"
,,,case 6 run "$desktop$\New Folder\45t.txt"
,,,case 7 run "$desktop$\New Folder\t55.txt"
,,,case 8 run "$desktop$\New Folder\555t.txt"
,,,case 9 run "$desktop$\New Folder\5555t.txt"
,,,case else ret
,,
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)