Screen w&h

How do I get the screen's width and height (real-time) using WinAPI ?
you can use GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN).Good works.
Last edited on
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)
> 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.