Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
changing 2D arrays to lpstr
#8
1. Easier to add columns in dialog editor, unless you need to do it at run time.
2. ICsv variable not necessary.

Function Confirm_Orders
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("Confirm_Orders" &Confirm_Orders 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x100 0 0 265 191 "Confirm Orders"
;3 QM_Grid 0x56031041 0x0 0 0 264 162 "0x3,0,0,0,0x0[]Scrip,80[]Quantity,70[]Sell Rate,70[]Stop Loss,70[]Trigger,70"
;4 Button 0x54032000 0x0 30 170 48 14 "Submit"
;5 Button 0x54032000 0x0 192 170 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "" "" ""

ret
;messages
DlgGrid g.Init(hDlg 3)
sel message
,case WM_INITDIALOG
,ARRAY(str) orders
,orders.create(2 3)
,orders[0 1]="Hi"
,orders[0 2]="Hello"
,int i nc(orders.len(1))
,for(i 0 orders.len)
,,out orders[0 i]
,,g.RowAddSetSA(i &orders[0 i] nc)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
ret
;messages2
sel wParam
,case IDOK
,;get and show all cells
,str s
,g.ToCsv(s ",")
,mes s
,
,case IDCANCEL
ret 1
;messages3
NMHDR* nh=+lParam
;if(nh.idFrom=3) ret DT_Ret(hDlg gridNotify(nh))


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)