1.设置对话框大小:
CRect temprect(150, 50, 1000, 500); CWnd::SetWindowPos(NULL, temprect.left, temprect.top, temprect.Width(), temprect.Height(), SWP_NOZORDER | SWP_NOMOVE);
2.使对话框全屏显示:
//得到显示器大小 int cx,cy; cx = GetSystemMetrics(SM_CXSCREEN); cy = GetSystemMetrics(SM_CYSCREEN); //再用MoveWindow CRect rcTemp; rcTemp.BottomRight() = CPoint(cx, cy); rcTemp.TopLeft() = CPoint(0, 0); MoveWindow(&rcTemp);