[PATCH 10/11] user32: Fixed maxPostion of thick child window.
Florian Köberle
florian at fkoeberle.de
Tue Jan 20 06:52:42 CST 2009
---
dlls/user32/tests/win.c | 8 ++++----
dlls/user32/winpos.c | 6 +++++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 1e94831..8f12443 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -5314,10 +5314,10 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
expectedPosY = expectedPosX;
actualPosX = minmax->ptMaxPosition.x;
actualPosY = minmax->ptMaxPosition.y;
- todo_wine
- ok(actualPosX == expectedPosX && actualPosY == expectedPosY,
- "expected maxPosition (%d/%d), actual maxPosition (%d/%d) for %s\n",
- expectedPosX, expectedPosY, actualPosX, actualPosY, test_thick_child_name);
+
+ ok(actualPosX == expectedPosX && actualPosY == expectedPosY,
+ "expected maxPosition (%d/%d), actual maxPosition (%d/%d) for %s\n",
+ expectedPosX, expectedPosY, actualPosX, actualPosY, test_thick_child_name);
break;
}
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 6317005..54d7dbe 100755
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -656,6 +656,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
{
MINMAXINFO MinMax;
HMONITOR monitor;
+ int border;
INT xinc, yinc;
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG exstyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
@@ -670,6 +671,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
if (style & WS_CHILD)
{
+ border = NC_CalculateBorder(style,exstyle);
+
if ((style & WS_CAPTION) == WS_CAPTION)
style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
@@ -683,7 +686,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXMAXTRACK);
MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYMAXTRACK);
- xinc = yinc = 0;
+ xinc = border;
+ yinc = border;
}
else
{
--
1.5.4.3
More information about the wine-patches
mailing list