X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ffdd8cf3c7aa760bec29050688487bb01806b83..713c7336f2c96b1deddd24ec38b2a094705635b9:/src/os2/frame.cpp diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index f7ab688deb..bfa1f560b8 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -127,7 +127,8 @@ bool wxFrame::Create( wxWindow* pParent, wxFrame::~wxFrame() { - m_isBeingDeleted = true; + SendDestroyEvent(); + DeleteAllBars(); } // end of wxFrame::~wxFrame @@ -280,7 +281,7 @@ void wxFrame::PositionStatusBar() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError(_T("Error setting parent for StatusBar. Error: %s\n"), sError.c_str()); + wxLogError(wxT("Error setting parent for StatusBar. Error: %s\n"), sError.c_str()); return; } } @@ -404,14 +405,14 @@ void wxFrame::InternalSetMenuBar() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str()); + wxLogError(wxT("Error setting parent for submenu. Error: %s\n"), sError.c_str()); } if (!::WinSetOwner(m_hMenu, m_hFrame)) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str()); + wxLogError(wxT("Error setting parent for submenu. Error: %s\n"), sError.c_str()); } ::WinSendMsg(m_hFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); } // end of wxFrame::InternalSetMenuBar @@ -433,7 +434,7 @@ void wxFrame::OnSysColourChanged( wxSysColourChangedEvent vEvent2; vEvent2.SetEventObject(m_frameStatusBar); - m_frameStatusBar->GetEventHandler()->ProcessEvent(vEvent2); + m_frameStatusBar->HandleWindowEvent(vEvent2); } #endif //wxUSE_STATUSBAR @@ -499,7 +500,7 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle ) if ((lStyle & wxFULLSCREEN_NOSTATUSBAR) && pTheStatusBar) { m_nFsStatusBarFields = pTheStatusBar->GetFieldsCount(); - SetStatusBar((wxStatusBar*) NULL); + SetStatusBar(NULL); delete pTheStatusBar; } else @@ -570,7 +571,7 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle ) wxSize sz( nWidth, nHeight ); wxSizeEvent vEvent( sz, GetId() ); - GetEventHandler()->ProcessEvent(vEvent); + HandleWindowEvent(vEvent); return true; } else @@ -1051,11 +1052,11 @@ bool wxFrame::HandleMenuSelect( WXWORD nItem, wxMenuEvent vEvent(wxEVT_MENU_HIGHLIGHT, nItem); vEvent.SetEventObject(this); - GetEventHandler()->ProcessEvent(vEvent); // return value would be ignored by PM + HandleWindowEvent(vEvent); // return value would be ignored by PM } else { - DoGiveHelp(wxEmptyString, false); + DoGiveHelp(wxEmptyString, true); return false; } } @@ -1379,20 +1380,3 @@ wxWindow* wxFrame::GetClient() return wxFindWinFromHandle((WXHWND)::WinWindowFromID(m_hFrame, FID_CLIENT)); } -void wxFrame::SendSizeEvent() -{ - if (!m_bIconized) - { - RECTL vRect = wxGetWindowRect(GetHwnd()); - - ::WinPostMsg( GetHwnd() - ,WM_SIZE - ,MPFROM2SHORT( vRect.xRight - vRect.xLeft - ,vRect.xRight - vRect.xLeft - ) - ,MPFROM2SHORT( vRect.yTop - vRect.yBottom - ,vRect.yTop - vRect.yBottom - ) - ); - } -}