]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/private.h
Old API clearly deprecated. Source cleaning.
[wxWidgets.git] / include / wx / msw / private.h
index 98aee97db435888de1cdeb85b31a72f81f7d449c..a7b41605a0dfbc2e14063c80f7989501e93e7523 100644 (file)
@@ -33,19 +33,6 @@ class WXDLLEXPORT wxWindow;
 // private constants
 // ---------------------------------------------------------------------------
 
-// Conversion
-static const double METRIC_CONVERSION_CONSTANT = 0.0393700787;
-
-// Scaling factors for various unit conversions
-static const double mm2inches = (METRIC_CONVERSION_CONSTANT);
-static const double inches2mm = (1/METRIC_CONVERSION_CONSTANT);
-
-static const double mm2twips = (METRIC_CONVERSION_CONSTANT*1440);
-static const double twips2mm = (1/(METRIC_CONVERSION_CONSTANT*1440));
-
-static const double mm2pt = (METRIC_CONVERSION_CONSTANT*72);
-static const double pt2mm = (1/(METRIC_CONVERSION_CONSTANT*72));
-
 // 260 was taken from windef.h
 #ifndef MAX_PATH
     #define MAX_PATH  260
@@ -236,13 +223,16 @@ struct WXDLLEXPORT wxCOLORMAP
 // this function is implemented in src/msw/window.cpp
 extern wxCOLORMAP *wxGetStdColourMap();
 
+// create a wxRect from Windows RECT
+inline wxRect wxRectFromRECT(const RECT& r)
+{
+    return wxRect(r.left, r.top, r.right - r.left, r.bottom - r.top);
+}
+
 // copy Windows RECT to our wxRect
 inline void wxCopyRECTToRect(const RECT& r, wxRect& rect)
 {
-    rect.y = r.top;
-    rect.x = r.left;
-    rect.width = r.right - r.left;
-    rect.height = r.bottom - r.top;
+    rect = wxRectFromRECT(r);
 }
 
 // translations between HIMETRIC units (which OLE likes) and pixels (which are