Screen w&h

May 30, 2009 at 7:47am
How do I get the screen's width and height (real-time) using WinAPI ?
May 30, 2009 at 9:46am
you can use GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN).Good works.
Last edited on May 30, 2009 at 9:47am
May 30, 2009 at 5:07pm
That will tell the size of screen or we can say desktop screen..

if you want to get the size of your window handle wm_size and it will give you the size.
LOWORD(lParam) will give width
HIWORD(lParam) will give height.

or at any time you can call getClientRect (this will include only the client part) or GetWindowRect (this includes the caption also)
Jun 2, 2009 at 4:03pm
> How do I get the screen's width and height (real-time) using WinAPI ?

Your questions are FAQ for 20 years....
Search on Google Groups (Win32)
Topic archived. No new replies allowed.