X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac8d0c118b7403e2838e75124b442051299e6f6c..d3e780ecdf69233c872d51216eedbc64a1b6db25:/src/msw/control.cpp diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 4d4c0e159f..df2d8b1109 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -106,11 +106,15 @@ bool wxControl::MSWCreateControl(const wxChar *classname, style |= WS_VISIBLE; } + // choose the position for the control int x = pos.x == -1 ? 0 : pos.x, y = pos.y == -1 ? 0 : pos.y, w = size.x == -1 ? 0 : size.x, h = size.y == -1 ? 0 : size.y; + // ... and adjust it to account for ap ossible parent frames toolbar + AdjustForParentClientOrigin(x, y); + m_hWnd = (WXHWND)::CreateWindowEx ( exstyle, // extended style