added wxBitmapToHICON/CURSOR helper functions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-03-22 23:47:06 +00:00
parent d1bf777402
commit 211b54b109
2 changed files with 84 additions and 2 deletions

View File

@@ -279,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
//