- return NULL; // No home known!
-}
-
-// Check whether this window wants to process messages, e.g. Stop button
-// in long calculations.
-bool wxCheckForInterrupt(
- wxWindow* pWnd
-)
-{
- if(pWnd)
- {
- QMSG vMsg;
- HAB hab = 0;
- HWND hwndFilter = NULLHANDLE;
- HWND hwndWin= (HWND) pWnd->GetHWND();
-
- while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
- {
- ::WinDispatchMsg(hab, &vMsg);
- }
- return TRUE;//*** temporary?
- }
- else
- {
- wxFAIL_MSG(_T("pWnd==NULL !!!"));
- return FALSE;//*** temporary?
- }
-}
-
-void wxGetMousePosition(
- int* pX
-, int* pY
-)
-{
- POINTL vPt;
-
- ::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);
-}
-
-// Get size of display
-void wxDisplaySize(
- int* pWidth
-, int* pHeight
-)
-{
- HPS hpsScreen;
- HDC hdcScreen;
- LONG lWidth;
- LONG lHeight;
-
- hpsScreen = ::WinGetScreenPS(HWND_DESKTOP);
- hdcScreen = ::GpiQueryDevice(hpsScreen);
- ::DevQueryCaps(hdcScreen, CAPS_WIDTH, 1L, &lWidth);
- ::DevQueryCaps(hdcScreen, CAPS_HEIGHT, 1L, &lHeight);
- DevCloseDC(hdcScreen);
- *pWidth = (int)lWidth;
- *pHeight = (int)lHeight;
-}
-
-bool wxDirExists(
- const wxString& rDir
-)
-{
- return (::DosSetCurrentDir(WXSTRINGCAST rDir));
-}
-
-// ---------------------------------------------------------------------------
-// window information functions
-// ---------------------------------------------------------------------------
-
-wxString WXDLLEXPORT wxGetWindowText(
- WXHWND hWnd
-)
-{
- wxString vStr;
- long lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
-
- ::WinQueryWindowText((HWND)hWnd, lLen, vStr.GetWriteBuf((int)lLen));
- vStr.UngetWriteBuf();
-
- return vStr;
-}
-
-wxString WXDLLEXPORT wxGetWindowClass(
- WXHWND hWnd
-)
-{
- wxString vStr;
- int nLen = 256; // some starting value
-
- for ( ;; )
- {
- int nCount = ::WinQueryClassName((HWND)hWnd, nLen, vStr.GetWriteBuf(nLen));
-
- vStr.UngetWriteBuf();
- if (nCount == nLen )
- {
- // the class name might have been truncated, retry with larger
- // buffer
- nLen *= 2;
- }
- else
- {
- break;
- }
- }
- return vStr;
-}
-
-WXWORD WXDLLEXPORT wxGetWindowId(
- WXHWND hWnd
-)
-{
- return ::WinQueryWindowUShort((HWND)hWnd, QWS_ID);