06-05-2015, 04:56 AM
Hello Gintaras and QM users,
I was trying to display some big images in a scrollable dialog. When I resize the main dialog, the child dialog doesn't resize. How can I fix this?
Thanks for any help.
Function dlg_cd_simple_main2
Function dlg_cd_simple_child2
I was trying to display some big images in a scrollable dialog. When I resize the main dialog, the child dialog doesn't resize. How can I fix this?
Thanks for any help.
Function dlg_cd_simple_main2
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
type DCSCONTROLS843 ~controls ~sb6
DCSCONTROLS843 d.controls="6"
d.sb6="$desktop$\Example_1.jpg"
#compile __ChildDialog
ChildDialog- cd
cd.Init(3 "dlg_cd_simple_child2" 0 &d 0 0xffffff)
str controls = "3"
if(!ShowDialog("dlg_cd_simple_main2" &dlg_cd_simple_main2 0)) ret
;BEGIN DIALOG
;0 "" 0x90CC0A48 0x10100 0 0 223 135 "Dialog"
;3 Static 0x44000000 0x0 0 0 223 135 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040300 "*" "" "" ""
ret
;messages
cd.Message(hDlg message wParam lParam)
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Function dlg_cd_simple_child2
;\Dialog_Editor
;BEGIN DIALOG
;0 "" 0x10040440 0x0 0 0 255 255 ""
;6 Static 0x5000000E 0x0 0 0 16 16 ""
;END DIALOG
;DIALOG EDITOR: "DCSCONTROLS843" 0x2040300 "" "" "" ""
;When creating a child dialog, in dialog editor unset most default styles of the dialog.
;Set only WS_VISIBLE (if you need it), DS_CONTROL, and optionally WS_EX_CLIENTEDGE or other style that adds frame.
;Parent dialog style should include WS_EX_CONTROLPARENT. Other styles can be default or as you need.