]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utilsgui.cpp
don't redefine HAVE_STRFTIME as it can already be defined by configure (forgotten...
[wxWidgets.git] / src / msw / utilsgui.cpp
index e74c0326a74644173cf69c0eb80c92d47923dbe7..1ee21a202644e9a79a18a34320c875c3f6ba6f15 100644 (file)
@@ -304,10 +304,8 @@ int WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
 // Metafile helpers
 // ----------------------------------------------------------------------------
 
-extern void PixelToHIMETRIC(LONG *x, LONG *y)
+void PixelToHIMETRIC(LONG *x, LONG *y, HDC hdcRef)
 {
-    ScreenHDC hdcRef;
-
     int iWidthMM = GetDeviceCaps(hdcRef, HORZSIZE),
         iHeightMM = GetDeviceCaps(hdcRef, VERTSIZE),
         iWidthPels = GetDeviceCaps(hdcRef, HORZRES),
@@ -319,10 +317,8 @@ extern void PixelToHIMETRIC(LONG *x, LONG *y)
     *y /= iHeightPels;
 }
 
-extern void HIMETRICToPixel(LONG *x, LONG *y)
+void HIMETRICToPixel(LONG *x, LONG *y, HDC hdcRef)
 {
-    ScreenHDC hdcRef;
-
     int iWidthMM = GetDeviceCaps(hdcRef, HORZSIZE),
         iHeightMM = GetDeviceCaps(hdcRef, VERTSIZE),
         iWidthPels = GetDeviceCaps(hdcRef, HORZRES),
@@ -334,6 +330,16 @@ extern void HIMETRICToPixel(LONG *x, LONG *y)
     *y /= (iHeightMM * 100);
 }
 
+void HIMETRICToPixel(LONG *x, LONG *y)
+{
+    HIMETRICToPixel(x, y, ScreenHDC());
+}
+
+void PixelToHIMETRIC(LONG *x, LONG *y)
+{
+    PixelToHIMETRIC(x, y, ScreenHDC());
+}
+
 void wxDrawLine(HDC hdc, int x1, int y1, int x2, int y2)
 {
 #ifdef __WXWINCE__