account for parent area origin when creating controls and windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-10-22 08:43:28 +00:00
parent 949b8e6284
commit 4e9d23cdae
2 changed files with 6 additions and 0 deletions

View File

@@ -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