I needed to find out the height of the screen in order to resize a dialog. I am calling GetSystemMetrics
with SM_CYFULLSCREEN
and I am getting a certain number (1028 in my case). Per MSDN:
To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the
SystemParametersInfo
function with theSPI_GETWORKAREA
value.
I called SystemParametersInfo
as well to see what it returns and I get a different number for the height, 1050. Running spy, the area without taskbar is indeed of height 1050. Does anyone know why the different heights? Thanks