X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2590f154ff935ee7a24ea4d25108e8ed97a56f04..c66b63e565d340f3a73441a4f780ab57842c7851:/src/os2/frame.cpp diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index e725d21116..f5024c8eb4 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -180,8 +180,6 @@ void wxFrame::DoSetClientSize( , int nHeight ) { - wxStatusBar* pStatusBar = GetStatusBar(); - // // Statusbars are not part of the OS/2 Client but parent frame // so no statusbar consideration @@ -217,8 +215,6 @@ wxStatusBar* wxFrame::OnCreateStatusBar( ) { wxStatusBar* pStatusBar = NULL; - SWP vSwp; - ERRORID vError; wxString sError; pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber @@ -281,7 +277,6 @@ void wxFrame::PositionStatusBar() int nY; int nStatbarWidth; int nStatbarHeight; - HWND hWndClient; RECTL vRect; RECTL vFRect; @@ -311,7 +306,7 @@ void wxFrame::PositionStatusBar() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Error setting parent for StautsBar. Error: %s\n", sError); + wxLogError("Error setting parent for StautsBar. Error: %s\n", sError.c_str()); return; } } @@ -355,17 +350,7 @@ void wxFrame::SetMenuBar( wxMenuBar* pMenuBar ) { - ERRORID vError; wxString sError; - HWND hTitlebar = NULLHANDLE; - HWND hHScroll = NULLHANDLE; - HWND hVScroll = NULLHANDLE; - HWND hMenuBar = NULLHANDLE; - SWP vSwp; - SWP vSwpTitlebar; - SWP vSwpVScroll; - SWP vSwpHScroll; - SWP vSwpMenu; if (!pMenuBar) { @@ -454,14 +439,14 @@ void wxFrame::InternalSetMenuBar() { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Error setting parent for submenu. Error: %s\n", sError); + wxLogError("Error setting parent for submenu. Error: %s\n", sError.c_str()); } if (!::WinSetOwner(m_hMenu, m_hFrame)) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); - wxLogError("Error setting parent for submenu. Error: %s\n", sError); + wxLogError("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 @@ -738,10 +723,8 @@ void wxFrame::PositionToolBar() if (!pToolBar) return; - HWND hWndClient; RECTL vRect; RECTL vFRect; - SWP vSwp; wxPoint vPos; ::WinQueryWindowRect(m_hFrame, &vRect); @@ -899,7 +882,6 @@ bool wxFrame::HandlePaint() if (hIcon) { - HWND hWndClient; RECTL vRect3; ::WinQueryWindowRect(GetHwnd(), &vRect3); @@ -1182,7 +1164,7 @@ MRESULT EXPENTRY wxFrameMainWndProc( } else { - pSWP[i].x = vRectl.xLeft; + pSWP[i].x = vRectl.xLeft + nWidth; pSWP[i].y = vRectl.yBottom + nHeight; pSWP[i].cx = vRectl.xRight - (vRectl.xLeft + nWidth); pSWP[i].cy = vRectl.yTop - vRectl.yBottom - nHeight; @@ -1227,7 +1209,6 @@ MRESULT EXPENTRY wxFrameWndProc( // MRESULT rc = (MRESULT)0; - bool bProcessed = FALSE; // // Stop right here if we don't have a valid handle in our wxWindow object. @@ -1325,8 +1306,6 @@ MRESULT wxFrame::OS2WindowProc( case WM_SIZE: { - SHORT nScxold = SHORT1FROMMP(wParam); // Old horizontal size. - SHORT nScyold = SHORT2FROMMP(wParam); // Old vertical size. SHORT nScxnew = SHORT1FROMMP(lParam); // New horizontal size. SHORT nScynew = SHORT2FROMMP(lParam); // New vertical size. @@ -1420,3 +1399,22 @@ 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 + ) + ); + } +} +