- ::WinQueryPointerPos(HWND_DESKTOP, &vPt);
- *pX = vPt.x;
- *pY = vPt.y;
-};
-
-// Return TRUE if we have a colour display
-bool wxColourDisplay()
-{
- HPS hpsScreen;
- HDC hdcScreen;
- LONG lColors;
-
- hpsScreen = ::WinGetScreenPS(HWND_DESKTOP);
- hdcScreen = ::GpiQueryDevice(hpsScreen);
- ::DevQueryCaps(hdcScreen, CAPS_COLORS, 1L, &lColors);
- return(lColors > 1L);
-}
-
-// Returns depth of screen
-int wxDisplayDepth()
-{
- HPS hpsScreen;
- HDC hdcScreen;
- LONG lPlanes;
- LONG lBitsPerPixel;
- LONG nDepth;
-
- hpsScreen = ::WinGetScreenPS(HWND_DESKTOP);
- hdcScreen = ::GpiQueryDevice(hpsScreen);
- ::DevQueryCaps(hdcScreen, CAPS_COLOR_PLANES, 1L, &lPlanes);
- ::DevQueryCaps(hdcScreen, CAPS_COLOR_BITCOUNT, 1L, &lBitsPerPixel);
-
- nDepth = (int)(lPlanes * lBitsPerPixel);
- DevCloseDC(hdcScreen);
- return (nDepth);
-}
+ //
+ // Remove the high order byte -- it is useless
+ //
+ vError &= 0x0000ffff;
+ switch(vError)
+ {
+ case PMERR_INVALID_HWND:
+ sError = wxT("Invalid window handle specified");
+ break;