+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
+)