MFC怎么获得当前屏幕大小
你可以这样
HWND hwnd=GetDesktopWindow();
RECT rect;
GetClientRect(hwnd,&rect);//可以得到桌面大小
还有就是上面所说的
int nScreenWidth, nScreenHeight;
nScreenWidth = GetSystemMetrics(SM_CXSCREEN);
nScreenHeight = GetSystemMetrics(SM_CYSCREEN);
-
RECT rt;
-
SystemParametersInfo(SPI_GETWORKAREA,0,(PVOID)&rt,0);