Style updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2002-02-22 23:30:31 +00:00
parent 229d3f1c1f
commit b9b1d6c8dd
19 changed files with 519 additions and 196 deletions

View File

@@ -23,6 +23,7 @@
#endif
#include "wx/os2/private.h"
#include "wx/image.h"
#include "assert.h"
@@ -52,6 +53,39 @@ wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSE
{
}
wxCursor::wxCursor(
const wxImage& rImage
)
{
wxImage vImage32 = rImage.Scale(32,32);
int nWidth = vImage32.GetWidth();
int nHeight = vImage32.GetHeight();
//
// Need a bitmap handle somehow
//
HBITMAP hBitmap = wxBitmap(vImage32).GetHBITMAP();
int nHotSpotX = vImage32.GetOptionInt(wxCUR_HOTSPOT_X);
int nHotSpotY = vImage32.GetOptionInt(wxCUR_HOTSPOT_Y);
if (nHotSpotX < 0 || nHotSpotX >= nWidth)
nHotSpotX = 0;
if (nHotSpotY < 0 || nHotSpotY >= nHeight)
nHotSpotY = 0;
wxCursorRefData* pRefData = new wxCursorRefData;
m_refData = pRefData;
pRefData->m_hCursor = (WXHCURSOR) ::WinCreatePointer( HWND_DESKTOP
,hBitmap
,TRUE
,nHotSpotY
,nHotSpotX
);
} // end of wxCursor::wxCursor
wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
{
m_refData = new wxCursorRefData;