获得屏幕大小的两种方法:

 方法一:

CRect rt;
 int screenW;
 int screenH;
 CWnd* pDeskTop = this->GetDesktopWindow();
 pDeskTop->GetClientRect(rt);
 screenW = rt.Width();
 screenH = rt.Height();

方法二:

int x = GetSystemMetrics(SM_CXFULLSCREEN);

int y = GetSystemMetrics(SM_CYFULLSCREEN);

原文地址:https://www.cnblogs.com/8586/p/1335275.html