Author: jimtabor
Date: Tue Sep 22 00:38:48 2015
New Revision: 69312
URL:
http://svn.reactos.org/svn/reactos?rev=69312&view=rev
Log:
[Win32SS]
- Fix MDI menu redraw. Tested with WineFile.
Modified:
trunk/reactos/win32ss/user/ntuser/nonclient.c
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/user32/windows/defwnd.c
trunk/reactos/win32ss/user/user32/windows/mdi.c
Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/noncli…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] Tue Sep 22 00:38:48 2015
@@ -988,6 +988,15 @@
if (!(Style & WS_MINIMIZE))
{
+ PMENU menu = UserGetMenuObject(UlongToHandle(pWnd->IDMenu));
+ /* Draw menu bar */
+ if (menu && !(Style & WS_CHILD))
+ {
+ TempRect = CurrentRect;
+ TempRect.bottom = TempRect.top + menu->cyMenu;
+ CurrentRect.top += MENU_DrawMenuBar(hDC, &TempRect, pWnd, FALSE);
+ }
+
if (ExStyle & WS_EX_CLIENTEDGE)
{
DrawEdge(hDC, &CurrentRect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
@@ -1014,7 +1023,6 @@
PWND Parent;
RECT WindowRect, CurrentRect, TempRect;
BOOL Active = FALSE;
- PCURICON_OBJECT pIcon = NULL;
if (!IntIsWindowVisible(pWnd) ||
(pWnd->state & WNDS_NONCPAINT && !(pWnd->state &
WNDS_FORCEMENUDRAW)) ||
@@ -1118,7 +1126,7 @@
CurrentRect.top += UserGetSystemMetrics(SM_CYCAPTION);
}
- UserDrawCaption(pWnd, hDC, &TempRect, NULL, pIcon ? UserHMGetHandle(pIcon) :
NULL, NULL, Flags);
+ UserDrawCaption(pWnd, hDC, &TempRect, NULL, NULL, NULL, Flags);
/* Draw buttons */
if (Style & WS_SYSMENU)
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Tue Sep 22 00:38:48 2015
@@ -380,6 +380,13 @@
switch(Routine)
{
+ case TWOPARAM_ROUTINE_REDRAWTITLE:
+ {
+ DWORD_PTR Ret;
+ Window = UserGetWindowObject((HWND)Param1);
+ Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2);
+ RETURN(Ret);
+ }
case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
{
DWORD_PTR Ret;
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] Tue Sep 22 00:38:48
2015
@@ -382,6 +382,7 @@
ReleaseDC(UserHMGetHandle(pwnd), hDC);
}
}
+
//NtUserCallTwoParam((DWORD_PTR)UserHMGetHandle(pwnd),Flags,TWOPARAM_ROUTINE_REDRAWTITLE)
}
LRESULT FASTCALL
Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Tue Sep 22 00:38:48 2015
@@ -1092,8 +1092,11 @@
DefWindowProcW( frame, WM_SETTEXT, 0, (LPARAM)lpBuffer );
if (repaint)
+ {
+ if (!NtUserCallTwoParam((DWORD_PTR)frame,DC_ACTIVE,TWOPARAM_ROUTINE_REDRAWTITLE))
SetWindowPos( frame, 0,0,0,0,0, SWP_FRAMECHANGED |
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER );
+ }
}