GetSystemMetrics
作者:互联网
获得屏幕尺寸大小
// 获得屏幕的宽度
int scrX=GetSystemMetrics(SM_CXSCREEN);
// 获得屏幕的高度
int scrY = GetSystemMetrics(SM_CYSCREEN);
// 获得有效区域的桌面大小(除去任务栏)
RECT rect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
int cx = rect.right - rect.left;
int cy = rect.bottom - rect.top;
标签:GetSystemMetrics,int,获得,SM,屏幕,rect 来源: https://www.cnblogs.com/greenleaf1976/p/16460397.html