void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
+ // use native scrolling when available and do it in generic way
+ // otherwise:
#ifdef __WXX11__
- wxWindowX11::ScrollWindow( dx, dy, rect );
+ wxWindowNative::ScrollWindow(dx, dy, rect);
#else
Refresh(TRUE /* erase bkgnd */, &r);
}
+ // scroll children accordingly:
+ wxPoint offset(dx, dy);
+
+ for (wxWindowList::Node *node = GetChildren().GetFirst();
+ node; node = node->GetNext())
+ {
+ wxWindow *child = node->GetData();
+ if ( child != m_scrollbarVert && child != m_scrollbarHorz &&
+ (rect == NULL || rect->Intersects(child->GetRect())) )
+ {
+ child->Move(child->GetPosition() + offset);
+ }
+ }
#endif
}
#endif // wxUSE_MENUS
+// ----------------------------------------------------------------------------
+// MSW-specific section
+// ----------------------------------------------------------------------------
+
+#ifdef __WXMSW__
+
+#include "wx/msw/private.h"
+
+long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
+{
+ if ( message == WM_NCHITTEST )
+ {
+ // the windows which contain the other windows should let the mouse
+ // events through, otherwise a window inside a static box would
+ // never get any events at all
+ if ( IsStaticBox() )
+ {
+ return HTTRANSPARENT;
+ }
+ }
+
+ return wxWindowNative::MSWWindowProc(message, wParam, lParam);
+}
+
+#endif // __WXMSW__
+