Make easier to compile with MSVC5.
[wxWidgets.git] / src / common / wincmn.cpp
index df455c9cfa4568af5e783e3bf17fa8149070474c..9a7b7a3bc66c0d9dbebb95116320341b0134ebd2 100644 (file)
@@ -1355,6 +1355,23 @@ void wxWindowBase::GetClientSizeConstraint(int *w, int *h) const
         GetClientSize(w, h);
 }
 
         GetClientSize(w, h);
 }
 
+void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags)
+{
+    // don't do it for the dialogs/frames - they float independently of their
+    // parent
+    if ( !IsTopLevel() )
+    {
+        wxWindow *parent = GetParent();
+        if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent )
+        {
+            wxPoint pt(parent->GetClientAreaOrigin());
+            x += pt.x;
+            y += pt.y;
+        }
+    }
+}
+
+
 void wxWindowBase::GetPositionConstraint(int *x, int *y) const
 {
     wxLayoutConstraints *constr = GetConstraints();
 void wxWindowBase::GetPositionConstraint(int *x, int *y) const
 {
     wxLayoutConstraints *constr = GetConstraints();