X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..3995f8eb97f3fa807fb7d805bb8b86425f490b06:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index b050eb8258..411e011c1a 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1174,6 +1174,14 @@ void wxWindow::DoGetClientSize(int *x, int *y) const *y = rect.bottom; } +void wxWindow::DoMoveWindow(int x, int y, int width, int height) +{ + if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) ) + { + wxLogLastError("MoveWindow"); + } +} + // set the size of the window: if the dimensions are positive, just use them, // but if any of them is equal to -1, it means that we must find the value for // it ourselves (unless sizeFlags contains wxSIZE_ALLOW_MINUS_ONE flag, in @@ -1225,7 +1233,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if ( size.x == -1 ) { - size= DoGetBestSize(); + size = DoGetBestSize(); } //else: already called DoGetBestSize() above @@ -1238,10 +1246,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags) } } - if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) ) - { - wxLogLastError("MoveWindow"); - } + DoMoveWindow(x, y, width, height); } // for a generic window there is no natural best size - just use the current one @@ -1281,7 +1286,7 @@ void wxWindow::DoSetClientSize(int width, int height) ::ScreenToClient(hParentWnd, &point); } - MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)TRUE); + DoMoveWindow(point.x, point.y, actual_width, actual_height); wxSizeEvent event(wxSize(width, height), m_windowId); event.SetEventObject(this); @@ -2291,7 +2296,7 @@ bool wxWindow::MSWCreate(int id, } m_hWnd = (WXHWND)CreateWindowEx(extendedStyle, - wclass, + className, title ? title : wxT(""), style, x1, y1,