MFC显示对话框的位置
//获取窗口显示的位置
GetDlgItem(IDC_STATIC_Child)->GetWindowRect(ChildFunctionRect);
ScreenToClient(ChildFunctionRect);//把屏幕的值转成实际的值
//在指定位置显示对话框
CDevelopInformationDlg *pInforDlg=new CDevelopInformationDlg;
pInforDlg->Create(IDD_DevelopInformationDlg);
pInforDlg->MoveWindow(ChildFunctionRect);
pInforDlg->ShowWindow(SW_SHOW);
其中的IDC_STATIC_Child是MFC中一个组框的ID,我的目的是在组框的位置处,显示一个一样大小的对话框IDD_DevelopInformationDlg,
但是结果显示出来,大小是对了,只是位置却偏左上方了