- return s_isColour != 0;
-#endif
-}
-
-// Returns depth of screen
-int wxDisplayDepth()
-{
- ScreenHDC dc;
- return GetDeviceCaps(dc, PLANES) * GetDeviceCaps(dc, BITSPIXEL);
-}
-
-// Get size of display
-void wxDisplaySize(int *width, int *height)
-{
-#ifdef __WXMICROWIN__
- RECT rect;
- HWND hWnd = GetDesktopWindow();
- ::GetWindowRect(hWnd, & rect);
-
- if ( width )
- *width = rect.right - rect.left;
- if ( height )
- *height = rect.bottom - rect.top;
-#else // !__WXMICROWIN__
- ScreenHDC dc;
-
- if ( width )
- *width = ::GetDeviceCaps(dc, HORZRES);
- if ( height )
- *height = ::GetDeviceCaps(dc, VERTRES);
-#endif // __WXMICROWIN__/!__WXMICROWIN__
-}
-
-void wxDisplaySizeMM(int *width, int *height)
-{
-#ifdef __WXMICROWIN__
- // MICROWIN_TODO
- if ( width )
- *width = 0;
- if ( height )
- *height = 0;
-#else
- ScreenHDC dc;
-
- if ( width )
- *width = ::GetDeviceCaps(dc, HORZSIZE);
- if ( height )
- *height = ::GetDeviceCaps(dc, VERTSIZE);
-#endif
-}
-
-void wxClientDisplayRect(int *x, int *y, int *width, int *height)
-{
-#if defined(__WIN16__) || defined(__WXMICROWIN__)
- *x = 0; *y = 0;
- wxDisplaySize(width, height);
-#else
- // Determine the desktop dimensions minus the taskbar and any other
- // special decorations...
- RECT r;
-
- SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- if (x) *x = r.left;
- if (y) *y = r.top;
- if (width) *width = r.right - r.left;
- if (height) *height = r.bottom - r.top;
-#endif
-}
-
-// ---------------------------------------------------------------------------
-// window information functions
-// ---------------------------------------------------------------------------
-
-wxString WXDLLEXPORT wxGetWindowText(WXHWND hWnd)
-{
- wxString str;
-
- if ( hWnd )
- {
- int len = GetWindowTextLength((HWND)hWnd) + 1;
- ::GetWindowText((HWND)hWnd, str.GetWriteBuf(len), len);
- str.UngetWriteBuf();
- }
-
- return str;
-}
-
-wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
-{
- wxString str;
-
- // MICROWIN_TODO
-#ifndef __WXMICROWIN__
- if ( hWnd )
- {
- int len = 256; // some starting value
-
- for ( ;; )
- {
- int count = ::GetClassName((HWND)hWnd, str.GetWriteBuf(len), len);
-
- str.UngetWriteBuf();
- if ( count == len )
- {
- // the class name might have been truncated, retry with larger
- // buffer
- len *= 2;
- }
- else
- {
- break;
- }
- }
- }