Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog size at run time
#3
Macro Macro2105
Code:
Copy      Help
int w=309
int h=250
str dd=
F
;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 400 300 "Data"
;3 QM_Grid 0x54030000 0x0 0 0 {w} {h} ""
;...

if(!ShowDialog(dd 0 &controls 0 2)) ret
However then cannot edit in dialog editor.
Better use regular expression.
Function Dialog127
Code:
Copy      Help
\Dialog_Editor

int w=309
int h=250

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;3 QM_Grid 0x56031041 0x200 8 8 96 48 "0x0,0,0,0,0x0[]A,,,[]B,,,"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2030507 "*" "" "" ""

if(dd.replacerx("^(3 \w+ \w+ \w+ \w+ \w+) \d+ \d+" F"$1 {w} {h}" 4|8)<=0) end "rx failed"

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

Or in dialog procedure (smart dialog) resize under case WM_INITDIALOG.

In dialog definition are used dialog units - depends on font size. In dialog procedure would need to use pixels.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)