/* 获取父窗体的位置信息 */
void CMyDlg::OnOpenChild()
{
// TODO: Add your control notification handler code here
CRect rect;
GetClientRect(&rect);
ClientToScreen(&rect);
dlg.x0 = rect.left;
dlg.y0 = (rect.bottom+rect.top) /2;
dlg.Create(IDD_CC);
dlg.ShowWindow(SW_SHOW);
}
/* 子窗体初始化函数 */
BOOL MyChild::OnInitDialog()
{
CDialog::OnInitDialog();
CRect rect;
GetClientRect(&rect);
ClientToScreen(&rect);
MoveWindow(x0,y0,rect.Width(),rect.Height());
return TRUE;
}