Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call multiple dialogs simultaneously.
#7
Where did you get:
Time_Runner Wrote:Function Dialog_3_TheVig
Code:
Copy      Help
str controls = "3"
str e4
sel message
,case 0 ;;on WM_INITDIALOG of the parent dialog
,ret ShowDialog("" &Dialog_3_TheVig &controls wParam 1 WS_CHILD 0 0 2 lParam)
,case 1 ;;on OK of the parent dialog
,hDlg=lParam
,DT_GetControls hDlg &controls
,out e4

This seems to get the job done:
Function Dialog_2_TheVig
Code:
Copy      Help
sel message
,case 0 ;;on WM_INITDIALOG of the parent dialog
,ret ShowDialog("" &Dialog_2_TheVig &controls wParam 1 WS_CHILD 0 0 100 100)

You can set the position in the call right here with the x y position in the show dialog.
ShowDialog([macro] [dlgproc] [controls] [hwndowner] [flags] [style] [notstyle] [param] [x] [y] [icon] [menu])

You are passing Y position through the lParam and then the hDlg through the wParam in parent Four_Into_One_Dialog_TheVig to the other dialogs.

Getting everything to resize with the main dialog is the real trick.
I would imagine it has something to do with: case WM_SIZE

But the only way I can seem to determine the size of the other dialogs is though the "BEGIN DIALOG" section...I can't just smack a variable in there because it only seems to accept hard numbers.

i.e.
;0 "" 0x124C0644 0x8111150 0 0 100 100 "Dialog A"
cannot be
;int i=100
;0 "" 0x124C0644 0x8111150 0 0 i i "Dialog A"


Otherwise I would say to pass a call through the WM_SIZE event that calls dialogs and sets the size based on the size of the parent dialog. But...I don't think it can be done that way. It has to have something to do with the WM_SIZE...I just don't know what yet!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)