// Checks if there is a toolbar, and returns the first free client position
wxPoint wxFrame::GetClientAreaOrigin() const
{
- wxPoint vPoint(0, 0);
+ wxPoint vPoint = wxTopLevelWindow::GetClientAreaOrigin();
-#if wxUSE_TOOLBAR
- if (GetToolBar())
- {
- int nWidth;
- int nHeight;
-
- GetToolBar()->GetSize( &nWidth
- ,&nHeight
- );
-
- if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL)
- {
- vPoint.x += nWidth;
- }
- else
- {
- // PM is backwards from windows
- vPoint.y += nHeight;
- }
- }
-#endif //wxUSE_TOOLBAR
+ //
+ // In OS/2 the toolbar and statusbar are frame extensions so there is no
+ // adjustment. The client is supposedly resized for a toolbar in OS/2
+ // as it is for the status bar.
+ //
return vPoint;
} // end of wxFrame::GetClientAreaOrigin
}
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;
{
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
+ )
+ );
+ }
+}
+