Arranging the dialogs
-
Elsie wrote:
I want to tile the 4 dialogs in the window, in my MFC application
Calculate the composite width and height of your dialogs and make sure the client portion of your window is exactly that size. As you create each dialog move it to the appropriate quadrant of the window.
-
You can dynamically create 4 dialogs, here is to create a dynamically child dialog:
// new a child dialog from the heap memory CRect rect; CChildDlg *pDlg=new CChildDlg(); // create a child dialog,and get the window rect. pDlg->Create(IDD_ChildDlg,NULL); pDlg->GetWindowRect(rect); // move it to point x =10, y =20 pDlg->MoveWindow(10,20,rect.bottom,rect.left,TRUE); // show and update the child window pDlg->ShowWindow(SW_SHOWNORMAL); pDlg->UpdateWindow(); pDlg = NULL;