install @lib$+"WINLIB2"
BS_DEFPUSHBUTTON = &1
CB_ADDSTRING = &143
CB_SETCURSEL = &14E
CBS_DROPDOWNLIST = &3
ES_AUTOHSCROLL = &80
ES_NUMBER = &2000
LB_ADDSTRING = &180
LB_GETCURSEL = &188
UDM_SETRANGE = &465
UDS_ALIGNRIGHT = &4
UDS_AUTOBUDDY = &10
UDS_SETBUDDYINT = &2
WS_CHILD = &40000000
WS_GROUP = &20000
WS_VISIBLE = &10000000
rem dlg%=fn_newdialog("NonStock", 40, 40, 270, 135, 10, 650)
rem proc_groupbox(dlg%, "Cutting Modes", 0, 4, 4, 152, 96, WS_GROUP)
dlg%=fn_newdialog("NonStock Tubing", 20, 20, 170, 128, 9, 600)
proc_groupbox(dlg%, "Group box", 0, 4, 4, 152, 120, WS_GROUP)
proc_editbox(dlg%, "Enter OD", 101, 12, 20, 64, 12, ES_AUTOHSCROLL)
proc_editbox(dlg%, "Enter ID", 102, 82, 20, 64, 12, ES_AUTOHSCROLL)
proc_editbox(dlg%, "Enter Wall", 103, 12, 40, 64, 12, ES_AUTOHSCROLL)
rem proc_listbox(dlg%, "Select", 104, 82, 40, 64, 48, 0)
rem proc_listbox(dlg%, "Info", 104, 2, 2, 220, 110, 0)
proc_combobox(dlg%, "", 104, 82, 40, 64, 48, CBS_DROPDOWNLIST)
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Butyrate 560"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Butyrate FDA"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Provista"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Provista UVA"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Butyrate Colored"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Provista Colored"
sys "SendDlgItemMessage", !dlg%, 104, CB_ADDSTRING, 0, "Polycarbonate"
proc_radiobutton(dlg%, "Del quoteFile", 105, 12, 64, 64, 10, 0)
proc_radiobutton(dlg%, "Keep quoteFile", 106, 12, 82, 64, 10, 0)
proc_pushbutton(dlg%, "OK", 1, 12, 108, 56, 14, WS_GROUP or BS_DEFPUSHBUTTON)
proc_pushbutton(dlg%, "Cancel", 2, 92, 108, 56, 14, 0)
proc_showdialog(dlg%)
on close proc_closedialog(dlg%):quit
on error proc_closedialog(dlg%):print'report$:end
Click%=0
on sys Click% = @wparam% : return
repeat
wait 1
click%=0
swap Click%, click%
until click%=1 or click%=2 or !dlg%=0
if click%=1 then
print "OK pressed, settings were:"'
dim text% 255
sys "GetDlgItemText", !dlg%, 101, text%, 255
print " OD Text box contained """$$text%""""
od=val($$text%)
rem SYS "GetDlgItemInt", !dlg%, 102, 0 ,FALSE TO id%
sys "GetDlgItemText", !dlg%, 102, text%,255
print " ID is """$$text%""""
rem Text box contained """$$text2%""""
id = val($$text%)
rem print "Number box contained ";Val%
sys "GetDlgItemText", !dlg%, 103, text%, 255
print "Combobox selection was """$$text%""""
print " WALL Text box contained """$$text%""""
wall=val($$text%)
sys "SendDlgItemMessage", !dlg%, 104, LB_GETCURSEL, 0, 0 to sel%
print "Listbox selection index was ";sel%
sys "IsDlgButtonChecked", !dlg%, 105 to rb1%
if rb1% then
R%=fn_delfile("busadafiles\Quotation.dat")
rem OSCLI "del busadafiles\quotation.dat"; PRINT "Quotation file deleted."
else print "Keep Quotation File"
endif
sys "IsDlgButtonChecked", !dlg%, 107 to cb%
if cb% print "Checkbox was checked" else print "Checkbox was not checked"
else
print "Cancel pressed"
endif
proc_closedialog(dlg%)