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:
@@ -106,11 +106,15 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
|
|||||||
style |= WS_VISIBLE;
|
style |= WS_VISIBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// choose the position for the control
|
||||||
int x = pos.x == -1 ? 0 : pos.x,
|
int x = pos.x == -1 ? 0 : pos.x,
|
||||||
y = pos.y == -1 ? 0 : pos.y,
|
y = pos.y == -1 ? 0 : pos.y,
|
||||||
w = size.x == -1 ? 0 : size.x,
|
w = size.x == -1 ? 0 : size.x,
|
||||||
h = size.y == -1 ? 0 : size.y;
|
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
|
m_hWnd = (WXHWND)::CreateWindowEx
|
||||||
(
|
(
|
||||||
exstyle, // extended style
|
exstyle, // extended style
|
||||||
|
@@ -2994,6 +2994,8 @@ bool wxWindowMSW::MSWGetCreateWindowCoords(const wxPoint& pos,
|
|||||||
nonDefault = TRUE;
|
nonDefault = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AdjustForParentClientOrigin(x, y);
|
||||||
|
|
||||||
return nonDefault;
|
return nonDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user