X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2590f154ff935ee7a24ea4d25108e8ed97a56f04..459073a9071798094b8280f1d374e06de5053f38:/src/os2/frame.cpp?ds=sidebyside diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index e725d21116..96743fc979 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -311,7 +311,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; } } @@ -454,14 +454,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 @@ -1182,7 +1182,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; @@ -1420,3 +1420,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 + ) + ); + } +} +