]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/scrolwin.h
Account for scrolling when setting the background brush origin in wxMSW.
[wxWidgets.git] / include / wx / scrolwin.h
index adc7e5a1fcb233c72b18f6160c50aba99ae8e096..73d93aaf613eb39a5ed00693c992d8748017aeff 100644 (file)
@@ -399,13 +399,19 @@ public:
 #endif
     }
 
+#ifdef __WXMSW__
     // we need to return a special WM_GETDLGCODE value to process just the
     // arrows but let the other navigation characters through
-#ifdef __WXMSW__
     virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
     {
         return FilterMSWWindowProc(nMsg, T::MSWWindowProc(nMsg, wParam, lParam));
     }
+
+    // Take into account the scroll origin.
+    virtual void MSWAdjustBrushOrg(int* xOrg, int* yOrg) const
+    {
+        CalcUnscrolledPosition(*xOrg, *yOrg, xOrg, yOrg);
+    }
 #endif // __WXMSW__
 
     WX_FORWARD_TO_SCROLL_HELPER()