]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/winuniv.cpp
applied patch for calculating the tree items size with non default font (patch 520965)
[wxWidgets.git] / src / univ / winuniv.cpp
index 719515c2313cd3090a557a15c1b09bbc24c01a68..a09d562d1fc3e6f2153e3d103e01e63ed510afc4 100644 (file)
@@ -1100,3 +1100,29 @@ void wxWindow::OnKeyUp(wxKeyEvent& event)
 
 #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__
+