Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scaling-down a dialog when moved to another screen
#6
I am sorry, but I failed using function DT_SetAutoSizeControls. Nevertheless, I empirically found that the following code satisfies my needs. As a matter of fact I would appreciate it if you could assist me in rewriting the code by avoiding the arbitrary part in WM_INITDIALOG.

Function Dialog33_Long
Code:
Copy      Help
\Dialog_Editor

;www.quickmacros.com/forum/viewtopic.php?p=29480

str dd=
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 370 371 "Dialog"
;3 Static 0x54000000 0x0 257 391 48 12 "Bottom"
;4 Static 0x54000000 0x0 14 8 48 12 "Top"
;5 Edit 0x54030080 0x200 120 188 96 12 ""
;6 Static 0x54000000 0x0 132 298 114 14 "bottom in Lin0"
;7 Static 0x54000000 0x0 132 320 114 14 "bottom in Lin1"
;8 Static 0x54000000 0x0 132 340 114 14 "bottom in Lin2"
;9 Static 0x54000000 0x0 132 350 48 12 "Bottom.."
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""

str controls = "5"
str e5
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,mov 0 -200 hDlg 1
,lef+ 424 776 hDlg ;; 'Dialog'
,int w2=win("Program Manager" "Progman")
,lef- 764 587 w2 1
;,0.2
,mov 0 5 hDlg 1

,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)