Created
December 12, 2023 18:28
-
-
Save Sohamkadam333/87fac1dd7204c5e8452bafe2cf38cc2f to your computer and use it in GitHub Desktop.
Retrieves the specified system metric or system configuration setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
using namespace std; | |
int main() | |
{ | |
int screenWidth = GetSystemMetrics(SM_CXSCREEN); | |
int screenHeight = GetSystemMetrics(SM_CYSCREEN); | |
int screenMonitors = GetSystemMetrics(SM_CMONITORS); | |
cout<<"Screen width = "<<screenWidth<<" px"<<endl; | |
cout<<"Screen height = "<<screenHeight<<" px"<<endl; | |
cout<<"Screen Monitors = "<<screenMonitors<<""<<endl; | |
system("PAUSE"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment