Platform SDK: Win32 API |
When a version 3.x application calls the GetSystemMetrics function to retrieve the SM_CYVSCROLL or SM_CYHSCROLL metric value, the function returns a value that is one pixel more than the actual height of the corresponding type of standard scroll bar. Windows 95/98 adds a pixel because applications written for previous versions of windows routinely subtract one pixel from the return value. Subtracting one pixel accounts for the way a standard scroll bar in a version 3.x application overlaps the border of the window in which it resides. A version 4.0 application receives the actual height of the scroll bar.
When a version 3.x application retrieves the SM_CXDLGFRAME and SM_CYDLGFRAME system metric values, GetSystemMetrics returns a value that is one pixel less that the actual frame width or height. A version 4.0 application receives the actual width or height.
GetSystemMetrics returns one pixel more than the actual height of a title bar when a version 3.x application requests the SM_CYCAPTION system metric value. A version 4.0 application receives the actual height of the title bar.
GetSystemMetrics returns one pixel less than the actual height of a menu bar when a version 3.x application requests the SM_CYMENU system metric value. A version 4.0 application receives the actual height of the menu bar.
When a version 3.x application calls GetSystemMetrics to retrieve the SM_CYFULLSCREEN value (height of a maximized window's client area), the function returns a value that is one pixel less than the actual height. This is because GetSystemMetrics returns one pixel more than the actual title bar height when an application retrieves the SM_CYCAPTION value. (The sum of the height of a maximized window's client area and the height of a title bar must equal the height of the working area of the screen.) A version 4.0 application receives the actual height of the maximized window's client area when it requests the SM_CYFULLSCREEN value.