Fixes for Standard WinCE SDK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-05-27 09:09:19 +00:00
parent f24764aa58
commit 45f272841c
7 changed files with 57 additions and 6 deletions

View File

@@ -545,6 +545,18 @@ void wxFrame::PositionToolBar()
}
#endif // wxUSE_STATUSBAR
int x = 0;
int y = 0;
#if defined(__WXWINCE__)
// We're using a commandbar - so we have to allow for it.
if (GetMenuBar() && GetMenuBar()->GetCommandBar())
{
RECT rect;
::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);
y = rect.bottom - rect.top;
}
#endif
int tx, ty;
int tw, th;
toolbar->GetPosition(&tx, &ty);
@@ -600,7 +612,7 @@ void wxFrame::PositionToolBar()
}
if (tx != 0 || ty != 0 || widthChanging || heightChanging)
toolbar->SetSize(0, 0, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
toolbar->SetSize(x, y, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
#endif // __WXWINCE__
}
@@ -793,6 +805,23 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
PositionToolBar();
#endif // wxUSE_TOOLBAR
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP))
// Position the menu command bar
if (GetMenuBar() && GetMenuBar()->GetCommandBar())
{
RECT rect;
::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);
wxSize clientSz = GetClientSize();
if ( !::MoveWindow((HWND) GetMenuBar()->GetCommandBar(), 0, 0, clientSz.x, rect.bottom - rect.top, true ) )
{
wxLogLastError(wxT("MoveWindow"));
}
}
#endif
processed = wxWindow::HandleSize(x, y, id);
}