#include "wx/msw/wrapwin.h"
#include "wx/window.h"
#include "wx/accel.h"
- #include "wx/setup.h"
#include "wx/menu.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
// We have to set the variables here to make them valid in events
// triggered by ::SetScrollInfo()
*(orient == wxHORIZONTAL ? &m_xThumbSize : &m_yThumbSize) = pageSize;
-
+
::SetScrollInfo(hWnd, orient == wxHORIZONTAL ? SB_HORZ : SB_VERT,
&info, refresh);
}
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
// wxApp::RegisterWindowClasses() and wxApp::UnregisterWindowClasses()
-
-#ifdef __WXWINCE__
+
+#ifdef __WXWINCE__
extern wxChar *wxCanvasClassName;
extern wxChar *wxCanvasClassNameNR;
#else
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;
}
}