your missing the dialog procedure
that code needs to be called from inside dialog procedure
tip: to post qm code on forum
In QM, to copy all or selected text, use menu Edit -> Other Formats -> Copy for QM Forum. It copies correct and colored code to the clipboard. Then simply paste in the forum. Don't use the Code button.
see https://www.quickmacros.com/forum/showth...56#pid2956 for more info
also for help with qmgrids look in the system folder
\System\Dialogs\Dialog Control Classes\DlgGrid\samples\sample_Grid
that code needs to be called from inside dialog procedure
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 QM_Grid 0x56031041 0x200 12 0 96 48 "0[]A[]B"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "3"
str qmg3
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
DlgGrid g.Init(hDlg 3)
sel message
,case WM_INITDIALOG
,ICsv x._create ;;create csv object
,x.FromString("A,B[]C,D")
,x.ToQmGrid(g 1)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
tip: to post qm code on forum
In QM, to copy all or selected text, use menu Edit -> Other Formats -> Copy for QM Forum. It copies correct and colored code to the clipboard. Then simply paste in the forum. Don't use the Code button.
see https://www.quickmacros.com/forum/showth...56#pid2956 for more info
also for help with qmgrids look in the system folder
\System\Dialogs\Dialog Control Classes\DlgGrid\samples\sample_Grid