mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:45:41 +00:00
[USER32]
- Implement RealUserDrawCaption and pass it to uxtheme in order to paint the classic caption when needed. CORE-9016 svn path=/trunk/; revision=66722
This commit is contained in:
parent
67fb6732b2
commit
387fa04f75
2 changed files with 17 additions and 1 deletions
|
@ -28,6 +28,7 @@ INT WINAPI RealSetScrollInfo(HWND,int,LPCSCROLLINFO,BOOL);
|
|||
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 @@ ResetUserApiHook(PUSERAPIHOOK puah)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -398,6 +398,16 @@ UserSendUiUpdateMsg(HWND hwnd, LPARAM lParam)
|
|||
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 @@ UserPaintCaption(HWND hwnd)
|
|||
*/
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue