| 1845 | |
| 1846 | |
| 1847 | void GetVirtualDesktopRect(RECT &aRect) |
| 1848 | { |
| 1849 | aRect.right = GetSystemMetrics(SM_CXVIRTUALSCREEN); |
| 1850 | if (aRect.right) // A non-zero value indicates the OS supports multiple monitors or at least SM_CXVIRTUALSCREEN. |
| 1851 | { |
| 1852 | aRect.left = GetSystemMetrics(SM_XVIRTUALSCREEN); // Might be negative or greater than zero. |
| 1853 | aRect.right += aRect.left; |
| 1854 | aRect.top = GetSystemMetrics(SM_YVIRTUALSCREEN); // Might be negative or greater than zero. |
| 1855 | aRect.bottom = aRect.top + GetSystemMetrics(SM_CYVIRTUALSCREEN); |
| 1856 | } |
| 1857 | else // Win95/NT do not support SM_CXVIRTUALSCREEN and such, so zero was returned. |
| 1858 | GetWindowRect(GetDesktopWindow(), &aRect); |
| 1859 | } |
| 1860 | |
| 1861 | |
| 1862 | |