]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/private.h
Win16 cursor/icon functions are not needed any longer
[wxWidgets.git] / include / wx / msw / private.h
index f4cb8b3908400e11fa2cc34149d1d0498f3a1e1e..9d639f1fb81942b0515da3e778ba690f82d04f80 100644 (file)
@@ -213,6 +213,7 @@ extern LONG APIENTRY _EXPORT
 #if wxUSE_GUI
 
 #include <wx/gdicmn.h>
+#include <wx/colour.h>
 
 // make conversion from wxColour and COLORREF a bit less painful
 inline COLORREF wxColourToRGB(const wxColour& c)
@@ -278,6 +279,17 @@ extern void PixelToHIMETRIC(LONG *x, LONG *y);
 // to invert the mask each time we pass one/get one to/from Windows
 extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0);
 
+// Creates an icon or cursor depending from a bitmap
+//
+// The bitmap must be valid and it should have a mask. If it doesn't, a default
+// mask is created using light grey as the transparent colour.
+extern HICON wxBitmapToHICON(const wxBitmap& bmp);
+
+// Same requirments as above apply and the bitmap must also have the correct
+// size.
+extern
+HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY);
+
 // get (x, y) from DWORD - notice that HI/LOWORD can *not* be used because they
 // will fail on system with multiple monitors where the coords may be negative
 //
@@ -356,7 +368,7 @@ class MemoryHDC
 {
 public:
     MemoryHDC() { m_hdc = ::CreateCompatibleDC(NULL); }
-   ~MemoryHDC() { ::DeleteObject(m_hdc);              }
+   ~MemoryHDC() { ::DeleteDC(m_hdc);                  }
 
     operator HDC() const { return m_hdc; }