wxFrame::wxFrame(void)
{
+ m_frameToolBar = NULL ;
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
// m_modalShowing = FALSE;
m_windowStyle = style;
m_frameMenuBar = NULL;
+ m_frameToolBar = NULL ;
m_frameStatusBar = NULL;
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
bool wxFrame::MSWProcessMessage(WXMSG* pMsg)
{
if (m_acceleratorTable != 0 &&
- ::TranslateAccelerator((HWND) GetHWND(), (HANDLE) m_acceleratorTable, (MSG *)pMsg))
+ ::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable, (MSG *)pMsg))
return TRUE;
return FALSE;
wxWindow *win = (wxWindow *)node->Data();
if ( !win->IsKindOf(CLASSINFO(wxFrame)) &&
!win->IsKindOf(CLASSINFO(wxDialog)) &&
- (win != GetStatusBar()) )
+ (win != GetStatusBar()) &&
+ (win != GetToolBar()) )
{
if ( child )
return; // it's our second subwindow - nothing to do
if ( child ) {
// we have exactly one child - set it's size to fill the whole frame
- int client_x, client_y;
+ int clientW, clientH;
+ GetClientSize(&clientW, &clientH);
- GetClientSize(&client_x, &client_y);
- child->SetSize(0, 0, client_x, client_y);
+ int x = 0;
+ int y = 0;
+
+ // Manage the toolbar if there is one
+ if ( GetToolBar() )
+ {
+ int wt, ht;
+ GetToolBar()->GetSize(&wt, &ht);
+ clientH -= ht;
+ y += ht;
+ GetToolBar()->SetSize(0, 0, clientW, ht);
+ }
+
+ child->SetSize(x, y, clientW, clientH);
}
}
}
}
+bool wxFrame::OnClose(void)
+{
+ return TRUE;
+}
+
// Destroy the window (delayed, if a managed window)
bool wxFrame::Destroy(void)
{