0

I am posting here on the off-chance that someone knows why my screen size is reported as 611 instead of 600?

GetSystemMetrics(SM_CYFULLSCREEN)

returns 611. My netbook is 1024x600, so I expected 600, not 611.

Googling for 1024x611 turns up a surprising number of results, also.

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173

2 Answers2

1

SM_CXFULLSCREEN and SM_CYFULLSCREEN returns the size of a full screen window, so would usually be less than your screen size due to the taskbar:

The width of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen that is not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.

Compare it to what SPI_GETWORKAREA in SystemParametersInfo returns for your display? Or what is your display set to in the control panel??

A 1024x640 screen would be a true 16:10 ratio and would amount to ~ 611 y available desktop size.

Matt
  • 68,711
  • 7
  • 155
  • 158
1

from other forum threads, it seems that GetSystemMetrics(SM_CYFULLSCREEN) does not always return the exptected result. it seems to be adjusted, and may not be the value you want.

try using GetSystemMetrics(SM_CYSCREEN), which will return the size of your primary monitor.

(also, note that some people use multiple monitors: take care of not constraining your application to a single monitor)

Adrien Plisson
  • 22,486
  • 6
  • 42
  • 73
  • This was it. Would be very interesting to know the reason why CYFULLSCREEN mangles this number, but I am happy enough that it works now. :-) – Prof. Falken Oct 07 '12 at 08:53
  • i do think it just represents something else: i am not sure, but it may be the height needed for a window when you want to make the _client area_ full screen (although i don't have anything to back this down). – Adrien Plisson Oct 07 '12 at 20:00