Author: jimtabor
Date: Fri Apr 4 14:59:19 2014
New Revision: 62611
URL:
http://svn.reactos.org/svn/reactos?rev=62611&view=rev
Log:
[User32]
- Add more to GetInsideRect NC.
- Sync port from wine with modifications.
Modified:
trunk/reactos/win32ss/user/user32/windows/defwnd.c
Modified: trunk/reactos/win32ss/user/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] Fri Apr 4 14:59:19
2014
@@ -123,15 +123,13 @@
/* Remove frame from rectangle */
if (UserHasThickFrameStyle(Style, ExStyle ))
{
- InflateRect(rect, -GetSystemMetrics(SM_CXFRAME),
- -GetSystemMetrics(SM_CYFRAME));
+ InflateRect(rect, -GetSystemMetrics(SM_CXFRAME), -GetSystemMetrics(SM_CYFRAME));
}
else
{
if (UserHasDlgFrameStyle(Style, ExStyle ))
{
- InflateRect(rect, -GetSystemMetrics(SM_CXDLGFRAME),
- -GetSystemMetrics(SM_CYDLGFRAME));
+ InflateRect(rect, -GetSystemMetrics(SM_CXDLGFRAME),
-GetSystemMetrics(SM_CYDLGFRAME));
/* FIXME: this isn't in NC_AdjustRect? why not? */
if (ExStyle & WS_EX_DLGMODALFRAME)
InflateRect( rect, -1, 0 );
@@ -140,10 +138,18 @@
{
if (UserHasThinFrameStyle(Style, ExStyle))
{
- InflateRect(rect, -GetSystemMetrics(SM_CXBORDER),
- -GetSystemMetrics(SM_CYBORDER));
- }
- }
+ InflateRect(rect, -GetSystemMetrics(SM_CXBORDER),
-GetSystemMetrics(SM_CYBORDER));
+ }
+ }
+ }
+ /* We have additional border information if the window
+ * is a child (but not an MDI child) */
+ if ((Style & WS_CHILD) && !(ExStyle & WS_EX_MDICHILD))
+ {
+ if (ExStyle & WS_EX_CLIENTEDGE)
+ InflateRect (rect, -GetSystemMetrics(SM_CXEDGE),
-GetSystemMetrics(SM_CYEDGE));
+ if (ExStyle & WS_EX_STATICEDGE)
+ InflateRect (rect, -GetSystemMetrics(SM_CXBORDER),
-GetSystemMetrics(SM_CYBORDER));
}
}
@@ -1086,7 +1092,6 @@
ReleaseDC(hWnd, hdc2);
CloseClipboard();
-
}