diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 5b39ce87a3..a1b15781f8 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -234,7 +234,7 @@ Compiling using the makefiles: 'make -f makefile.b32 DLL=1' and then for each sample, 'make -f makefile.b32 WXUSINGDLL=1' - Unfortunately there are still undiagnosed run-time problems + Please note that the samples have not been exhaustively tested with this configuration. Note (1): the wxWindows library and (some) samples compile in 16-bit mode diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 9a7231e8ff..457c2da1e0 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -226,8 +226,8 @@ public: wxRealPoint() { x = y = 0.0; }; wxRealPoint(double xx, double yy) { x = xx; y = yy; }; - wxRealPoint operator+(const wxRealPoint& pt) { return wxRealPoint(x + pt.x, y + pt.y); } - wxRealPoint operator-(const wxRealPoint& pt) { return wxRealPoint(x - pt.x, y - pt.y); } + wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } + wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } }; @@ -247,8 +247,8 @@ public: bool operator!=(const wxPoint& p) const { return !(*this == p); } // arithmetic operations (component wise) - wxPoint operator+(const wxPoint& p) { return wxPoint(x + p.x, y + p.y); } - wxPoint operator-(const wxPoint& p) { return wxPoint(x - p.x, y - p.y); } + wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); } + wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); } wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } diff --git a/include/wx/generic/dragimgg.h b/include/wx/generic/dragimgg.h index 5f04eb7367..20f11bb283 100644 --- a/include/wx/generic/dragimgg.h +++ b/include/wx/generic/dragimgg.h @@ -200,6 +200,7 @@ protected: wxCursor m_cursor; wxCursor m_oldCursor; wxPoint m_hotspot; + wxPoint m_offset; // The hostpot value passed to BeginDrag wxPoint m_position; bool m_isDirty; bool m_isShown; diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index ec4e8e0ed6..f00f76941b 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -735,8 +735,8 @@ // wxUSE_DBEUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL)) -#undef wxUSE_DBEUG_NEW_ALWAYS -#define wxUSE_DBEUG_NEW_ALWAYS 0 +#undef wxUSE_DEBUG_NEW_ALWAYS +#define wxUSE_DEBUG_NEW_ALWAYS 0 #endif #if defined(__WXMSW__) && defined(__WATCOMC__) diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp index 8cace36f76..a3708fa671 100644 --- a/src/generic/dragimgg.cpp +++ b/src/generic/dragimgg.cpp @@ -187,13 +187,15 @@ bool wxGenericDragImage::Create(const wxListCtrl& listCtrl, long id) } // Begin drag -bool wxGenericDragImage::BeginDrag(const wxPoint& WXUNUSED(hotspot), +bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen, wxRect* rect) { wxASSERT_MSG( (window != 0), wxT("Window must not be null in BeginDrag.")); + // The image should be offset by this amount + m_offset = hotspot; m_window = window; m_fullScreen = fullScreen; @@ -320,7 +322,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt) bool eraseOldImage = (m_isDirty && m_isShown); if (m_isShown) - RedrawImage(oldPos, pt, eraseOldImage, TRUE); + RedrawImage(oldPos - m_offset, pt - m_offset, eraseOldImage, TRUE); m_position = pt; @@ -346,7 +348,7 @@ bool wxGenericDragImage::Show() memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y); memDC.SelectObject(wxNullBitmap); - RedrawImage(m_position, m_position, FALSE, TRUE); + RedrawImage(m_position - m_offset, m_position - m_offset, FALSE, TRUE); } m_isShown = TRUE; @@ -363,7 +365,7 @@ bool wxGenericDragImage::Hide() if (m_isShown && m_isDirty) { - RedrawImage(m_position, m_position, TRUE, FALSE); + RedrawImage(m_position - m_offset, m_position - m_offset, TRUE, FALSE); } m_isShown = FALSE;