文件名称:更改分辨率程序
文件大小:4KB
文件格式:TXT
更新时间:2017-01-14 10:15:41
VC 分辨率
使对话框及控件随着分辨率变化 int cx = GetSystemMetrics( SM_CXSCREEN ); int cy = GetSystemMetrics( SM_CYSCREEN ); double dRatioX=(double)1024/(double)cx; double dRatioY=(768)*1.0/(cy); CRect rect; this->GetWindowRect(rect); rect.top=rect.top; rect.bottom=(rect.bottom-rect.top)/dRatioY+rect.top; rect.left=rect.left/dRatioX; rect.right=rect.right/dRatioX; this->MoveWindow(rect, TRUE ); AdjustControlsWindow(dRatioX,dRatioY);