Get Screen area
I don't know the function to get the screen size.
Please tell me.
# 3 Re: Get Screen area
Sorry.I want to know the (API) function to get the System Screen Size.
For exaple 800 X 600, 640 X 480.
at 2007-11-10 4:44:14 >

# 4 Re: Get Screen area
HDC hdc = ::GetDC(NULL);
int x = GetDeviceCaps(hdc, HORZRES); returns 600 (800)
int y = GetDeviceCaps(hdc, VERTRES); returns 480 (600)
::ReleaseDC(NULL, hdc);
at 2007-11-10 4:45:19 >

# 5 Re: Get Screen area
You can also try CWnd::GetDesktopWindow()->GetWindowRect(&rect), if you are using MFC. Or ::GetWindowRect(::GetDesktopWindow(), &rect)
at 2007-11-10 4:46:19 >

# 6 Re: Get Screen area
The following code will get the width and height, in pixels, of the screen of the primary display monitor:
int nScreenWidth = ::GetSystemMetrics(SM_CXSCREEN)
int nScreenHeight = ::GetSystemMetrics(SM_CYSCREEN)
at 2007-11-10 4:47:18 >
