Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resize control on resize dialog
#1
Function test
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 420 63 "test"
;3 Edit 0x54231044 0x200 0 0 420 63 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040301 "*" "" "" ""

I want to adjust the size of control "3" (multine inputfield) when the dialog get's resized.
I want to give the control the same dimensions as the dialog size.

In the dialog init I tried the code beneath, but I can't to get the "controls" parameter set correctly within the function "DT_SetAuto..."
Also I don't know how give control "3" the same size as the window size after resize (Parameter "Action - m (move) or s (resize)).
(Or does the function itself take care of that?)

I tried first under "WM_INIT..." and after that I it under tried "WM_SIZE"

Code:
Copy      Help
case WM_INITDIALOG
    DT_SetAutoSizeControls(hDlg "e3") .... ?
---------------------------
case WM_SIZE        
    DT_SetAutoSizeControls(hDlg "e3") .... ?
#2
Function Dialog192
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 420 63 "test"
;3 Edit 0x54231044 0x200 0 0 420 63 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040301 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DT_SetAutoSizeControls hDlg "3s"
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#3
Yes this works!
Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)