Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resizable dialog, resizable controls, splitters
#18
On Windows Vista/7 can check: dialog editor -> grid properties -> more style -> auto size columns.
On older windows need to resize explicitly on WM_SIZE.

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

str controls = "3"
str qmg3x
if(!ShowDialog("dlg_grid_auto_resize" &dlg_grid_auto_resize &controls)) ret

;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 217 120 "Dialog"
;3 QM_Grid 0x56031041 0x0 0 0 216 114 "0x0,0,0,0,0x0[]A,,,[]B,,,"
;END DIALOG
;DIALOG EDITOR: "" 0x2030304 "*" "" ""

ret
;messages
DlgGrid g.Init(hDlg 3)
DT_AutoSizeControls hDlg message "3s"
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SIZE
,g.ColumnsWidthAdjust
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)