15,979
社区成员
发帖
与我相关
我的任务
分享
BOOL CGetNameDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
//方法一
CRect rect;
CWnd* pWnd = AfxGetMainWnd();
pWnd->GetWindowRect(rect);
//方法二
CRect rect2;
pWnd->GetClientRect(rect2);
pWnd->ClientToScreen(rect2);
MoveWindow(rect.left, rect.top + 50, 300, 150);
// MoveWindow(rect2.left, rect2.top, 300, 150);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}