return pending position/size if any, not the current one
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1452,6 +1452,18 @@ void wxWindowMSW::DoSetToolTip(wxToolTip *tooltip)
|
||||
|
||||
// Get total size
|
||||
void wxWindowMSW::DoGetSize(int *x, int *y) const
|
||||
{
|
||||
// if SetSize() had been called at wx level but not realized at Windows
|
||||
// level yet (i.e. EndDeferWindowPos() not called), we still should return
|
||||
// the new and not the old position to the other wx code
|
||||
if ( m_pendingSize != wxDefaultSize )
|
||||
{
|
||||
if ( x )
|
||||
*x = m_pendingSize.x;
|
||||
if ( y )
|
||||
*y = m_pendingSize.y;
|
||||
}
|
||||
else // use current size
|
||||
{
|
||||
RECT rect = wxGetWindowRect(GetHwnd());
|
||||
|
||||
@@ -1460,10 +1472,13 @@ void wxWindowMSW::DoGetSize(int *x, int *y) const
|
||||
if ( y )
|
||||
*y = rect.bottom - rect.top;
|
||||
}
|
||||
}
|
||||
|
||||
// Get size *available for subwindows* i.e. excluding menu bar etc.
|
||||
void wxWindowMSW::DoGetClientSize(int *x, int *y) const
|
||||
{
|
||||
// this is only for top level windows whose resizing is never deferred, so
|
||||
// we can safely use the current size here
|
||||
RECT rect = wxGetClientRect(GetHwnd());
|
||||
|
||||
if ( x )
|
||||
@@ -1473,6 +1488,15 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const
|
||||
}
|
||||
|
||||
void wxWindowMSW::DoGetPosition(int *x, int *y) const
|
||||
{
|
||||
if ( m_pendingPosition != wxDefaultPosition )
|
||||
{
|
||||
if ( x )
|
||||
*x = m_pendingPosition.x;
|
||||
if ( y )
|
||||
*y = m_pendingPosition.y;
|
||||
}
|
||||
else // use current position
|
||||
{
|
||||
RECT rect = wxGetWindowRect(GetHwnd());
|
||||
|
||||
@@ -1511,6 +1535,7 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const
|
||||
if ( y )
|
||||
*y = point.y;
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindowMSW::DoScreenToClient(int *x, int *y) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user