]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
wxBusyInfo interface moved to generic to make space for possible native implementatio...
[wxWidgets.git] / src / msw / window.cpp
index 8aa92e8e2f3c8668fdaf84b062ac06126febd89b..6bd5ca66fb1aff3c86f2a1dc5db625256ee8f7e1 100644 (file)
@@ -1090,7 +1090,7 @@ void wxWindowMSW::DissociateHandle()
 
 
 bool wxCheckWindowWndProc(WXHWND hWnd,
-                          WXFARPROC WXUNUSED_IN_WINCE(wndProc))
+                          WXFARPROC WXUNUSED(wndProc))
 {
 // TODO: This list of window class names should be factored out so they can be
 // managed in one place and then accessed from here and other places, such as
@@ -1512,12 +1512,21 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const
         if ( y )
             *y = rect.bottom;
     }
-    else // non top level
+    else // non top level and using deferred sizing
     {
-        // size is the same as client size for non top level windows, so
-        // forward to GetSize() to take into account deferred sizing (which
-        // wxGetClientRect() doesn't)
-        DoGetSize(x, y);
+        // we need to calculate the *pending* client size here
+        RECT rect;
+        rect.left = m_pendingPosition.x;
+        rect.top = m_pendingPosition.y;
+        rect.right = rect.left + m_pendingSize.x;
+        rect.bottom = rect.top + m_pendingSize.y;
+
+        ::SendMessage(GetHwnd(), WM_NCCALCSIZE, FALSE, (LPARAM)&rect);
+
+        if ( x )
+            *x = rect.right - rect.left;
+        if ( y )
+            *y = rect.bottom - rect.top;
     }
 }