This function retrieves various system metrics (widths and heights of display elements) and system configuration settings. All dimensions retrieved by GetSystemMetrics are in pixels. System metrics may vary from display to display.
int GetSystemMetrics( int nIndex )
If the function succeeds, the return value is the requested system metric or configuration setting. If the function fails, the return value is zero.
EX1
void GetSystemMetrics_ex1() { int cx = GetSystemMetrics(SM_CXSCREEN); int cy = GetSystemMetrics(SM_CYSCREEN); printf("The screen resolution is %d x %d\n", cx, cy); }
origin.h