]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/private.h
Small speed up to fonts and support for scaling.
[wxWidgets.git] / include / wx / msw / private.h
index 0406fe9bc7703f97b75ba5a1b1e9867c4909ba5d..390a7007b973206fd9497eda4659ecb9919cd9d9 100644 (file)
 
 #include <windows.h>
 
+
+#if defined (__WXWINCE__)
+    #include <wingdi.h>     // RGB, COLORREF
+    #include <winuser.h>    // Global Namespaces ::GetKeyState, ::GetWindowRect
+#endif
+
+
 #ifdef __WXMICROWIN__
     // Extra prototypes and symbols not defined by MicroWindows
     #include "wx/msw/microwin.h"
@@ -81,12 +88,15 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
 
 // this defines a CASTWNDPROC macro which casts a pointer to the type of a
 // window proc
-#if defined(STRICT) || defined(__GNUC__)
+#if defined(__WXWINCE__)
+    typedef FARPROC WndProcCast;
+#elif defined(STRICT) || defined(__GNUC__)
     typedef WNDPROC WndProcCast;
 #else
     typedef FARPROC WndProcCast;
 #endif
 
+
 #define CASTWNDPROC (WndProcCast)
 
 // ---------------------------------------------------------------------------
@@ -336,6 +346,8 @@ public:
 
 private:
     HDC m_hdc;
+
+    DECLARE_NO_COPY_CLASS(ScreenHDC)
 };
 
 // the same as ScreenHDC but for memory DCs: creates the HDC in ctor and
@@ -344,12 +356,14 @@ class MemoryHDC
 {
 public:
     MemoryHDC() { m_hdc = ::CreateCompatibleDC(NULL); }
-   ~MemoryHDC() { ::DeleteObject(m_hdc);              }
+   ~MemoryHDC() { ::DeleteDC(m_hdc);                  }
 
     operator HDC() const { return m_hdc; }
 
 private:
     HDC m_hdc;
+
+    DECLARE_NO_COPY_CLASS(MemoryHDC)
 };
 
 // a class which selects a GDI object into a DC in its ctor and deselects in
@@ -368,6 +382,8 @@ public:
 private:
    HDC m_hdc;
    HGDIOBJ m_hgdiobj;
+
+    DECLARE_NO_COPY_CLASS(SelectInHDC)
 };
 
 // ---------------------------------------------------------------------------