SM_CYFULLSCREEN gives full screen client size, add caption height.
screen_height = GetSystemMetrics(SM_CYFULLSCREEN)
+ GetSystemMetrics(SM_CYCAPTION);
Mark Williams wrote in message <64cm0a$2...@holly.demon.co.uk>...
>How do you get the desktop screen size? I want to display a window which
>fills the whole screen.
>
>I have tryed GetSystemMetrics(SM_C[X/Y]FULLSCREEN). The function seems
>to return the correct width but the height is always 19 pixels short
>of the screen size.
>
GetSystemMetrics returns the size of a maximized windows, so it removes from
the total height of the window the size of the system tray.
To get the screen size you have to get a DC for the entire screen surface
(GetWindowDC(NULL)) and the use GetDeviceCaps(dc,HORZRES) and
GetDeviceCaps(dc,VERTRES) to retrieve screen size.
Valter Minute
min...@fortech.it
www.fortech.it
try SM_C[X/Y]SCREEN instead of FULLSCREEN. Those work for me.
FULLSCREEN is maybe occluding the space for the taskbar?
Bill
Joe
--
Joachim Feise Microsoft Certified Solutions Developer
mailto:jfe...@acm.org http://www.ics.uci.edu/~jfeise/
mailto:jfe...@ics.uci.edu mailto:jfe...@ecs.com
---------------------------------------------------------------------
By US Code Title 47, Sec.227(a)(2)(B), a computer/modem/printer meets
the definition of a telephone fax machine. By Sec.227(b)(1)(C), it is
unlawful to send any unsolicited advertisement to such equipment.
By Sec.227(b)(3)(C), a violation of the aforementioned section is
punishable by action to recover actual monetary loss, or $500,
whichever is greater, for each violation.
Thanks for all the replies - This one works for me!
Regards,