HDC dc = GetDC(GetDesktopWindow());if (dc) { cout << "Screen size: " << GetDeviceCaps(dc, HORZRES) << "x" << GetDeviceCaps(dc, VERTRES) << endl; cout << "Refresh rate: " << GetDeviceCaps(dc, VREFRESH) << endl; cout << "Bits/Pixel: " << GetDeviceCaps(dc, BITSPIXEL) << endl; ReleaseDC(GetDesktopWindow(), dc);}
QString typeProcessor(){ SYSTEM_INFO systemInfo; GetSystemInfo(&systemInfo); QString type; switch(systemInfo.dwProcessorType) { case PROCESSOR_INTEL_386: type = "Intel 386"; break; case PROCESSOR_INTEL_486: type = "Intel 486"; break; case PROCESSOR_INTEL_PENTIUM: type = "Intel Pentium"; break; case PROCESSOR_MIPS_R4000: type = "Mips R4000"; break; case PROCESSOR_ALPHA_21064: type = "Alpha 21064"; break; case PROCESSOR_INTEL_IA64: type = "Intel IA64"; break; } return type;}
int horizontalSize;int verticalSize;int diagonal;HDC dc = GetDC(NULL);horizontalSize = GetDeviceCaps(dc, HORZSIZE);verticalSize = GetDeviceCaps(dc, VERTSIZE);diagonal = ( (sqrt ( pow(horizontalSize, 2) + pow(verticalSize, 2) ) ) / 10) / 2.54;