]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/private.h
Added flags argument to wxKill and wxProcess::Kill to allow it to
[wxWidgets.git] / include / wx / msw / private.h
index 7ac00c9e050f93877572f128037f4f68bdd293f0..98aee97db435888de1cdeb85b31a72f81f7d449c 100644 (file)
@@ -225,7 +225,7 @@ enum wxSTD_COLOUR
     wxSTD_COL_BTNSHADOW,
     wxSTD_COL_BTNFACE,
     wxSTD_COL_BTNHIGHLIGHT,
-    wxSTD_COL_MAX,
+    wxSTD_COL_MAX
 };
 
 struct WXDLLEXPORT wxCOLORMAP
@@ -405,6 +405,27 @@ private:
    DECLARE_NO_COPY_CLASS(SelectInHDC)
 };
 
+// a class for temporary bitmaps
+class CompatibleBitmap
+{
+public:
+    CompatibleBitmap(HDC hdc, int w, int h)
+    {
+        m_hbmp = ::CreateCompatibleBitmap(hdc, w, h);
+    }
+
+    ~CompatibleBitmap()
+    {
+        if ( m_hbmp )
+            ::DeleteObject(m_hbmp);
+    }
+
+    operator HBITMAP() const { return m_hbmp; }
+
+private:
+    HBITMAP m_hbmp;
+};
+
 // when working with global pointers (which is unfortunately still necessary
 // sometimes, e.g. for clipboard) it is important to unlock them exactly as
 // many times as we lock them which just asks for using a "smart lock" class