]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/frame.cpp
Removed some code duplicating wxAppBase functions.
[wxWidgets.git] / src / os2 / frame.cpp
index e725d211161f88f3671f7443510ceebbfd50717d..96743fc97989fc92e1a7530cbbafcbd145d6573c 100644 (file)
@@ -311,7 +311,7 @@ void wxFrame::PositionStatusBar()
         {
             vError = ::WinGetLastError(vHabmain);
             sError = wxPMErrorToStr(vError);
         {
             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;
         }
     }
             return;
         }
     }
@@ -454,14 +454,14 @@ void wxFrame::InternalSetMenuBar()
     {
         vError = ::WinGetLastError(vHabmain);
         sError = wxPMErrorToStr(vError);
     {
         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);
     }
 
     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
     }
     ::WinSendMsg(m_hFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
 } // end of wxFrame::InternalSetMenuBar
@@ -1182,7 +1182,7 @@ MRESULT EXPENTRY wxFrameMainWndProc(
                         }
                         else
                         {
                         }
                         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;
                             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));
 }
 {
     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
+                                  )
+                    );
+    }
+}
+