- *x = rect.right;
- *y = rect.bottom;
-}
-
-// Set the client size (i.e. leave the calculation of borders etc.
-// to wxWindows)
-void wxFrame::SetClientSize(int width, int height)
-{
- HWND hWnd = (HWND) GetHWND();
-
- RECT rect;
- GetClientRect(hWnd, &rect);
-
- RECT rect2;
- GetWindowRect(hWnd, &rect2);
-
- // Find the difference between the entire window (title bar and all)
- // and the client area; add this to the new client size to move the
- // window
- int actual_width = rect2.right - rect2.left - rect.right + width;
- int actual_height = rect2.bottom - rect2.top - rect.bottom + height;
-
- if ( GetStatusBar() )
- {
- int statusX, statusY;
- GetStatusBar()->GetClientSize(&statusX, &statusY);
- actual_height += statusY;
- }
-
- wxPoint pt(GetClientAreaOrigin());
- actual_width += pt.y;
- actual_height += pt.x;
-
- POINT point;
- point.x = rect2.left;
- point.y = rect2.top;
-
- MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE);
-
- wxSizeEvent event(wxSize(width, height), m_windowId);
- event.SetEventObject( this );
- GetEventHandler()->ProcessEvent(event);
-}
-
-void wxFrame::GetSize(int *width, int *height) const
-{
- RECT rect;
- GetWindowRect((HWND) GetHWND(), &rect);
- *width = rect.right - rect.left;
- *height = rect.bottom - rect.top;
-}
-
-void wxFrame::GetPosition(int *x, int *y) const
-{
- RECT rect;
- GetWindowRect((HWND) GetHWND(), &rect);
- POINT point;
- point.x = rect.left;
- point.y = rect.top;
-
- *x = point.x;
- *y = point.y;