How get net screen size?
-
I've got an application which I want to fit into the y dimension of the screen. The function: cyMon = ::GetSystemMetrics( SM_CYSCREEN); gives me the screen dimension, but I want the net dimension not including the task bar, if the task bar isn't being auto-hidden. I see that if I hit the maximize button, the system is clever enough to take into consideration whether or not the task bar is displayed. If I could somehow get the system to tell me what its maximize size it, that would give me the answer. The GetSystemMetrics gives me the same answer, with and without the task bar. Does anyone know the appropriate call? Thanks, Ilan
-
I've got an application which I want to fit into the y dimension of the screen. The function: cyMon = ::GetSystemMetrics( SM_CYSCREEN); gives me the screen dimension, but I want the net dimension not including the task bar, if the task bar isn't being auto-hidden. I see that if I hit the maximize button, the system is clever enough to take into consideration whether or not the task bar is displayed. If I could somehow get the system to tell me what its maximize size it, that would give me the answer. The GetSystemMetrics gives me the same answer, with and without the task bar. Does anyone know the appropriate call? Thanks, Ilan
-
I've got an application which I want to fit into the y dimension of the screen. The function: cyMon = ::GetSystemMetrics( SM_CYSCREEN); gives me the screen dimension, but I want the net dimension not including the task bar, if the task bar isn't being auto-hidden. I see that if I hit the maximize button, the system is clever enough to take into consideration whether or not the task bar is displayed. If I could somehow get the system to tell me what its maximize size it, that would give me the answer. The GetSystemMetrics gives me the same answer, with and without the task bar. Does anyone know the appropriate call? Thanks, Ilan
You need to use
SystemParametersInfo
with theSPI_GETWORKAREA
value: Retrieves the size of the work area on the primary display monitor. The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. The pvParam parameter must point to a RECT structure that receives the coordinates of the work area, expressed in virtual screen coordinates. -
I've got an application which I want to fit into the y dimension of the screen. The function: cyMon = ::GetSystemMetrics( SM_CYSCREEN); gives me the screen dimension, but I want the net dimension not including the task bar, if the task bar isn't being auto-hidden. I see that if I hit the maximize button, the system is clever enough to take into consideration whether or not the task bar is displayed. If I could somehow get the system to tell me what its maximize size it, that would give me the answer. The GetSystemMetrics gives me the same answer, with and without the task bar. Does anyone know the appropriate call? Thanks, Ilan
Check this http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/systemparametersinfo.asp[^] With SPI_GETWORKAREA flag. Hope these helps. Regards Abhishake Lahare