void CStoreFilePathDlg::initPosition()
{
//获取桌面坐标
CRect r;
this->GetDesktopWindow()->GetWindowRect(&r);
//设置窗口参数
int x,y;
x = (r.Width() - WINDOW_WIDTH)/2;//左上方X坐标
y = (r.Height() - WINDOW_HEIGTH)/2;//左上方Y坐标
//改变窗口大小和位置
this->SetWindowPos(NULL,x,y,WINDOW_WIDTH,WINDOW_HEIGTH,SWP_SHOWWINDOW);
}
{
//获取桌面坐标
CRect r;
this->GetDesktopWindow()->GetWindowRect(&r);
//设置窗口参数
int x,y;
x = (r.Width() - WINDOW_WIDTH)/2;//左上方X坐标
y = (r.Height() - WINDOW_HEIGTH)/2;//左上方Y坐标
//改变窗口大小和位置
this->SetWindowPos(NULL,x,y,WINDOW_WIDTH,WINDOW_HEIGTH,SWP_SHOWWINDOW);
}