]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utils.cpp
Merged some STC fixes over to the main branch
[wxWidgets.git] / src / os2 / utils.cpp
index 31b8f70da6848a159c941c22834400b6e1eb02d4..4ae4063779875044af997ddaf3e70a47cfd99689 100644 (file)
@@ -26,8 +26,6 @@
 #include <ctype.h>
 #ifdef __EMX__
 #include <dirent.h>
-#else
-#include <direct.h>
 #endif
 
 #include "wx/log.h"
@@ -757,6 +755,31 @@ void wxDisplaySize(
     *pHeight = (int)lHeight;
 }
 
+void wxDisplaySizeMM(
+  int*                              pWidth
+, int*                              pHeight
+)
+{
+    HPS                             hpsScreen;
+    HDC                             hdcScreen;
+
+    hpsScreen = ::WinGetScreenPS(HWND_DESKTOP);
+    hdcScreen = ::GpiQueryDevice(hpsScreen);
+
+    if (pWidth)
+        ::DevQueryCaps( hdcScreen
+                       ,CAPS_HORIZONTAL_RESOLUTION
+                       ,1L
+                       ,(PLONG)pWidth
+                      );
+    if (pHeight)
+        ::DevQueryCaps( hdcScreen
+                       ,CAPS_VERTICAL_RESOLUTION
+                       ,1L
+                       ,(PLONG)pHeight
+                      );
+}
+
 bool wxDirExists(
   const wxString&                   rDir
 )