C/C++获取屏幕分辨率的方法
int main(int argc, char* argv[])
{
// 需要添加头文件:
// #include <Windows.h> system("title Dan.Jacky QQ:773091523");
system("color 0a"); int nScreenWidth, nScreenHeight;
nScreenWidth = GetSystemMetrics(SM_CXSCREEN);
nScreenHeight = GetSystemMetrics(SM_CYSCREEN);
printf("当前屏幕的分辨率为:%d×%d", nScreenWidth, nScreenHeight); getchar();
return ;
}