Author: gadamopoulos
Date: Sun Mar 15 13:37:13 2015
New Revision: 66722
URL:
http://svn.reactos.org/svn/reactos?rev=66722&view=rev
Log:
[USER32]
- Implement RealUserDrawCaption and pass it to uxtheme in order to paint the classic
caption when needed.
CORE-9016
Modified:
trunk/reactos/win32ss/user/user32/misc/usrapihk.c
trunk/reactos/win32ss/user/user32/windows/defwnd.c
Modified: trunk/reactos/win32ss/user/user32/misc/usrapihk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/u…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/usrapihk.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/usrapihk.c [iso-8859-1] Sun Mar 15 13:37:13
2015
@@ -28,6 +28,7 @@
BOOL WINAPI RealSystemParametersInfoA(UINT,UINT,PVOID,UINT);
BOOL WINAPI RealSystemParametersInfoW(UINT,UINT,PVOID,UINT);
DWORD WINAPI GetRealWindowOwner(HWND);
+LRESULT WINAPI RealUserDrawCaption(HWND hWnd, HDC hDC, LPCRECT lpRc, UINT uFlags);
/* GLOBALS *******************************************************************/
@@ -154,7 +155,7 @@
puah->SystemParametersInfoW = (FARPROC)RealSystemParametersInfoW;
puah->ForceResetUserApiHook = (FARPROC)ForceResetUserApiHook;
puah->DrawFrameControl = (FARPROC)RealDrawFrameControl;
- puah->DrawCaption = (FARPROC)NtUserDrawCaption;
+ puah->DrawCaption = (FARPROC)RealUserDrawCaption;
puah->MDIRedrawFrame = (FARPROC)RealMDIRedrawFrame;
puah->GetRealWindowOwner = (FARPROC)GetRealWindowOwner;
}
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] Sun Mar 15 13:37:13
2015
@@ -398,6 +398,16 @@
return TRUE;
}
+/*
+ RealUserDrawCaption: This function is passed through RegisterUserApiHook to uxtheme
+ to call it when the classic caption is needed to be drawn.
+ */
+LRESULT WINAPI
+RealUserDrawCaption(HWND hWnd, HDC hDC, LPCRECT lpRc, UINT uFlags)
+{
+ return DefWndNCPaint(hWnd, HRGN_WINDOW, -1);
+}
+
static void
UserPaintCaption(HWND hwnd)
{
@@ -411,6 +421,11 @@
*/
if(gpsi->dwSRVIFlags & SRVINFO_APIHOOK)
{
+ /*
+ * This will cause uxtheme to either paint the themed caption or call
+ * RealUserDrawCaption in order to draw the classic caption when themes
+ * are disabled but the themes service is enabled
+ */
SendMessage(hwnd, WM_NCUAHDRAWCAPTION,0,0);
}
else