ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
577 discussions
Start a n
N
ew thread
[ion] 55587: Build fix.
by ion@svn.reactos.org
Author: ion Date: Tue Feb 14 01:38:35 2012 New Revision: 55587 URL:
http://svn.reactos.org/svn/reactos?rev=55587&view=rev
Log: Build fix. Modified: trunk/reactos/subsystems/csr/csrsrv/srv.h Modified: trunk/reactos/subsystems/csr/csrsrv/srv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/srv.…
============================================================================== --- trunk/reactos/subsystems/csr/csrsrv/srv.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/csr/csrsrv/srv.h [iso-8859-1] Tue Feb 14 01:38:35 2012 @@ -1,4 +1,5 @@ -#pragma once +#ifndef _SRV_H +#define _SRV_H /* PSDK/NDK Headers */ #define NTOS_MODE_USER @@ -391,3 +392,4 @@ NTSTATUS NTAPI CsrSetDirectorySecurity(IN HANDLE ObjectDirectory); +#endif
12 years, 10 months
1
0
0
0
[rharabien] 55586: [COMCTL32] - Draw shadow if item has focus but isn't selected
by rharabien@svn.reactos.org
Author: rharabien Date: Tue Feb 14 00:58:59 2012 New Revision: 55586 URL:
http://svn.reactos.org/svn/reactos?rev=55586&view=rev
Log: [COMCTL32] - Draw shadow if item has focus but isn't selected Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/listview.c Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Tue Feb 14 00:58:59 2012 @@ -296,7 +296,19 @@ } /* Listview invalidation functions: use _only_ these functions to invalidate */ -@@ -5117,7 +5129,11 @@ +@@ -4698,7 +4710,10 @@ + if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) + rcLabel.bottom--; + +- DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); ++ if ((!(lvItem.state & LVIS_SELECTED) || !infoPtr->bFocus) && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT)) ++ DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2); ++ else ++ DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); + + postpaint: + if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT) +@@ -5117,7 +5132,11 @@ /* Draw marquee rectangle if appropriate */ if (infoPtr->bMarqueeSelect) @@ -308,7 +320,7 @@ if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); -@@ -7927,6 +7943,7 @@ +@@ -7927,6 +7946,7 @@ { TRACE("(color=%x)\n", color); @@ -316,7 +328,7 @@ if(infoPtr->clrBk != color) { if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush); infoPtr->clrBk = color; -@@ -9314,6 +9331,7 @@ +@@ -9314,6 +9334,7 @@ infoPtr->clrText = CLR_DEFAULT; infoPtr->clrTextBk = CLR_DEFAULT; LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow); @@ -324,7 +336,7 @@ /* set default values */ infoPtr->nFocusedItem = -1; -@@ -11570,6 +11588,12 @@ +@@ -11570,6 +11591,12 @@ case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Tue Feb 14 00:58:59 2012 @@ -4710,7 +4710,7 @@ if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) rcLabel.bottom--; - if (!lprcFocus && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT)) + if ((!(lvItem.state & LVIS_SELECTED) || !infoPtr->bFocus) && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT)) DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2); else DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
12 years, 10 months
1
0
0
0
[ion] 55585: [CSRSRV2/CSRSS2]: Make multiple fixes to, bring up to speed, and finish implementation of the CSRSS/CSRSRV that has been laying around in trunk since forever. Not yet tested if it actu...
by ion@svn.reactos.org
Author: ion Date: Tue Feb 14 00:57:32 2012 New Revision: 55585 URL:
http://svn.reactos.org/svn/reactos?rev=55585&view=rev
Log: [CSRSRV2/CSRSS2]: Make multiple fixes to, bring up to speed, and finish implementation of the CSRSS/CSRSRV that has been laying around in trunk since forever. Not yet tested if it actually works yet, but it should now build and be much closer to fully functional. Of course, the trick is to figure out how to get it to co-exist with the current CSRSS/win32csr. Added: trunk/reactos/subsystems/csr/CMakeLists.txt (with props) trunk/reactos/subsystems/csr/csrsrv/CMakeLists.txt (with props) trunk/reactos/subsystems/csr/csrsrv/csrsrv2.spec (with props) Removed: trunk/reactos/subsystems/csr/csr.rbuild trunk/reactos/subsystems/csr/csrsrv/csrsrv.rbuild trunk/reactos/subsystems/csr/csrsrv/csrsrv.spec Modified: trunk/reactos/include/reactos/subsys/csr/server.h trunk/reactos/subsystems/CMakeLists.txt trunk/reactos/subsystems/csr/csrsrv/api.c trunk/reactos/subsystems/csr/csrsrv/init.c trunk/reactos/subsystems/csr/csrsrv/process.c trunk/reactos/subsystems/csr/csrsrv/server.c trunk/reactos/subsystems/csr/csrsrv/session.c trunk/reactos/subsystems/csr/csrsrv/srv.h trunk/reactos/subsystems/csr/csrsrv/status.h trunk/reactos/subsystems/csr/csrsrv/thread.c trunk/reactos/subsystems/csr/csrsrv/wait.c trunk/reactos/subsystems/csr/main.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/include/reactos/subsys/csr/server.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/csr…
Modified: trunk/reactos/subsystems/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/CMakeLists.txt?…
Added: trunk/reactos/subsystems/csr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/CMakeLists.…
Removed: trunk/reactos/subsystems/csr/csr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csr.rbuild?…
Added: trunk/reactos/subsystems/csr/csrsrv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/CMak…
Modified: trunk/reactos/subsystems/csr/csrsrv/api.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/api.…
Removed: trunk/reactos/subsystems/csr/csrsrv/csrsrv.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/csrs…
Removed: trunk/reactos/subsystems/csr/csrsrv/csrsrv.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/csrs…
Added: trunk/reactos/subsystems/csr/csrsrv/csrsrv2.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/csrs…
Modified: trunk/reactos/subsystems/csr/csrsrv/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/init…
Modified: trunk/reactos/subsystems/csr/csrsrv/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/proc…
Modified: trunk/reactos/subsystems/csr/csrsrv/server.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/serv…
Modified: trunk/reactos/subsystems/csr/csrsrv/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/sess…
Modified: trunk/reactos/subsystems/csr/csrsrv/srv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/srv.…
Modified: trunk/reactos/subsystems/csr/csrsrv/status.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/stat…
Modified: trunk/reactos/subsystems/csr/csrsrv/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/thre…
Modified: trunk/reactos/subsystems/csr/csrsrv/wait.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/csrsrv/wait…
Modified: trunk/reactos/subsystems/csr/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/csr/main.c?rev=…
12 years, 10 months
1
0
0
0
[ion] 55584: [SMLIB]: Implement SmSessionComplete.
by ion@svn.reactos.org
Author: ion Date: Tue Feb 14 00:54:32 2012 New Revision: 55584 URL:
http://svn.reactos.org/svn/reactos?rev=55584&view=rev
Log: [SMLIB]: Implement SmSessionComplete. Modified: trunk/reactos/include/reactos/subsys/sm/smmsg.h trunk/reactos/lib/smlib/smclient.c Modified: trunk/reactos/include/reactos/subsys/sm/smmsg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/sm/…
============================================================================== --- trunk/reactos/include/reactos/subsys/sm/smmsg.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/subsys/sm/smmsg.h [iso-8859-1] Tue Feb 14 00:54:32 2012 @@ -43,7 +43,7 @@ typedef struct _SM_SESSION_COMPLETE_MSG { ULONG SessionId; - NTSTATUS Status; + NTSTATUS SessionStatus; } SM_SESSION_COMPLETE_MSG, *PSM_SESSION_COMPLETE_MSG; typedef struct _SM_TERMINATE_FOREIGN_SESSION_MSG @@ -219,6 +219,15 @@ #endif // +// SB Message Handler +// +typedef +BOOLEAN +(NTAPI *PSB_API_ROUTINE)( + IN PSB_API_MSG SbApiMsg +); + +// // The actual server functions that a client linking with smlib can call // NTSTATUS @@ -238,4 +247,12 @@ IN BOOLEAN DebugFlag ); -#endif +NTSTATUS +NTAPI +SmSessionComplete( + IN HANDLE SmApiPort, + IN ULONG SessionId, + IN NTSTATUS SessionStatus +); + +#endif Modified: trunk/reactos/lib/smlib/smclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/smlib/smclient.c?rev=5…
============================================================================== --- trunk/reactos/lib/smlib/smclient.c [iso-8859-1] (original) +++ trunk/reactos/lib/smlib/smclient.c [iso-8859-1] Tue Feb 14 00:54:32 2012 @@ -128,3 +128,41 @@ /* Return if the connection was successful or not */ return Status; } + +NTSTATUS +NTAPI +SmSessionComplete(IN HANDLE SmApiPort, + IN ULONG SessionId, + IN NTSTATUS SessionStatus) +{ + NTSTATUS Status; + SM_API_MSG ApiMessage; + PSM_SESSION_COMPLETE_MSG SessionComplete = &ApiMessage.u.SessionComplete; + + /* Set the message data */ + SessionComplete->SessionId = SessionId; + SessionComplete->SessionStatus = SessionStatus; + + /* Set the API Message Port Message header */ + ApiMessage.ApiNumber = SmSessionCompleteApi; + ApiMessage.h.u1.s1.DataLength = sizeof(SM_SESSION_COMPLETE_MSG) + 8; + ApiMessage.h.u1.s1.TotalLength = sizeof(SM_API_MSG); + ApiMessage.h.u2.ZeroInit = 0; + + /* Sent the message and wait for a reply */ + Status = NtRequestWaitReplyPort(SmApiPort, + &ApiMessage.h, + &ApiMessage.h); + if (NT_SUCCESS(Status)) + { + /* Return the real status */ + Status = ApiMessage.ReturnValue; + } + else + { + DPRINT1("SmCompleteSession: NtRequestWaitReply failed\n"); + } + + /* Return status */ + return Status; +}
12 years, 10 months
1
0
0
0
[rharabien] 55583: [COMCTL32] - Add support for LVS_EX_TRANSPARENTSHADOWTEXT style [SHELL32] - Add drop shadows support for desktop - Set proper label color based on background color when drop shad...
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Feb 13 20:52:20 2012 New Revision: 55583 URL:
http://svn.reactos.org/svn/reactos?rev=55583&view=rev
Log: [COMCTL32] - Add support for LVS_EX_TRANSPARENTSHADOWTEXT style [SHELL32] - Add drop shadows support for desktop - Set proper label color based on background color when drop shadows is disabled - Update desktop colors when WM_SYSCOLORCHANGE or WM_SETTINGCHANGE msg is received [BOOTDATA] - Enable drop shadows by default (this option was hardcoded to 1 before) [DESK] - Send WM_SETTINGCHANGE with wParam = 0 when applying changes [EXPLORER] - Broadcast WM_SETTINGCHANGE message to shell view window Modified: trunk/reactos/base/shell/explorer/desktop/desktop.cpp trunk/reactos/boot/bootdata/hivedef_i386.inf trunk/reactos/dll/cpl/desk/background.c trunk/reactos/dll/win32/comctl32/listview.c trunk/reactos/dll/win32/shell32/desktop.cpp trunk/reactos/dll/win32/shell32/shlview.cpp Modified: trunk/reactos/base/shell/explorer/desktop/desktop.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/deskto…
============================================================================== --- trunk/reactos/base/shell/explorer/desktop/desktop.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/desktop/desktop.cpp [iso-8859-1] Mon Feb 13 20:52:20 2012 @@ -467,10 +467,14 @@ // redraw background window - it's done by system //InvalidateRect(g_Globals._hwndShellView, NULL, TRUE); - // forward message to common controls + // forward message to common controls SendMessage(g_Globals._hwndShellView, WM_SYSCOLORCHANGE, 0, 0); SendMessage(_desktopBar, WM_SYSCOLORCHANGE, 0, 0); break; + + case WM_SETTINGCHANGE: + SendMessage(g_Globals._hwndShellView, nmsg, wparam, lparam); + break; default: def: return super::WndProc(nmsg, wparam, lparam); Modified: trunk/reactos/boot/bootdata/hivedef_i386.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef_i386…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/cpl/desk/background.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
============================================================================== --- trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] Mon Feb 13 20:52:20 2012 @@ -812,6 +812,7 @@ SetWallpaper(pData); if(pData->bClrBackgroundChanged) SetDesktopBackColor(hwndDlg, pData); + SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)_T("")); return TRUE; case LVN_ITEMCHANGED: Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Mon Feb 13 20:52:20 2012 @@ -4710,7 +4710,10 @@ if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) rcLabel.bottom--; - DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); + if (!lprcFocus && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT)) + DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2); + else + DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); postpaint: if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT) Modified: trunk/reactos/dll/win32/shell32/desktop.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/desktop.…
============================================================================== --- trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] Mon Feb 13 20:52:20 2012 @@ -422,18 +422,18 @@ break; case WM_SYSCOLORCHANGE: + case WM_SETTINGCHANGE: { - InvalidateRect(pThis->hWnd, - NULL, - TRUE); - - if (pThis->hWndShellView != NULL) + if (uMsg == WM_SYSCOLORCHANGE || wParam == SPI_SETDESKWALLPAPER || wParam == 0) { - /* Forward the message */ - SendMessageW(pThis->hWndShellView, - WM_SYSCOLORCHANGE, - wParam, - lParam); + if (pThis->hWndShellView != NULL) + { + /* Forward the message */ + SendMessageW(pThis->hWndShellView, + uMsg, + wParam, + lParam); + } } break; } Modified: trunk/reactos/dll/win32/shell32/shlview.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] Mon Feb 13 20:52:20 2012 @@ -111,6 +111,7 @@ void CheckToolbar(); void SetStyle(DWORD dwAdd, DWORD dwRemove); BOOL CreateList(); + void UpdateListColors(); BOOL InitList(); static INT CALLBACK CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); static INT CALLBACK ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); @@ -207,6 +208,7 @@ LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT OnCustomItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); static ATL::CWndClassInfo& GetWndClassInfo() { @@ -257,6 +259,7 @@ MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground) MESSAGE_HANDLER(WM_SYSCOLORCHANGE, OnSysColorChange) MESSAGE_HANDLER(CWM_GETISHELLBROWSER, OnGetShellBrowser) + MESSAGE_HANDLER(WM_SETTINGCHANGE, OnSettingChange) END_MSG_MAP() BEGIN_COM_MAP(CDefView) @@ -509,29 +512,42 @@ ListViewSortInfo.nHeaderID = -1; ListViewSortInfo.nLastHeaderID = -1; + UpdateListColors(); + + /* UpdateShellSettings(); */ + return TRUE; +} + +void CDefView::UpdateListColors() +{ if (FolderSettings.fFlags & FWF_DESKTOP) { - /* - * FIXME: look at the registry value - * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow - * and activate drop shadows if necessary - */ - if (1) + /* Check if drop shadows option is enabled */ + BOOL bDropShadow = FALSE; + DWORD cbDropShadow = sizeof(bDropShadow); + WCHAR wszBuf[16] = L""; + + RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + L"ListviewShadow", RRF_RT_DWORD, NULL, &bDropShadow, &cbDropShadow); + if (bDropShadow && SystemParametersInfoW(SPI_GETDESKWALLPAPER, _countof(wszBuf), wszBuf, 0) && wszBuf[0]) { SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE); SendMessageW(hWndList, LVM_SETBKCOLOR, 0, CLR_NONE); + SendMessageW(hWndList, LVM_SETTEXTCOLOR, 0, RGB(255, 255, 255)); + SendMessageW(hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTSHADOWTEXT, LVS_EX_TRANSPARENTSHADOWTEXT); } else { - SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); - SendMessageW(hWndList, LVM_SETBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); + COLORREF crDesktop = GetSysColor(COLOR_DESKTOP); + SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, crDesktop); + SendMessageW(hWndList, LVM_SETBKCOLOR, 0, crDesktop); + if (GetRValue(crDesktop) + GetGValue(crDesktop) + GetBValue(crDesktop) > 128 * 3) + SendMessageW(hWndList, LVM_SETTEXTCOLOR, 0, RGB(0, 0, 0)); + else + SendMessageW(hWndList, LVM_SETTEXTCOLOR, 0, RGB(255, 255, 255)); + SendMessageW(hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTSHADOWTEXT, 0); } - - SendMessageW(hWndList, LVM_SETTEXTCOLOR, 0, RGB(255, 255, 255)); - } - - /* UpdateShellSettings(); */ - return TRUE; + } } /********************************************************** @@ -888,6 +904,9 @@ LRESULT CDefView::OnSysColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { + /* Update desktop labels color */ + UpdateListColors(); + /* Forward WM_SYSCOLORCHANGE to common controls */ return SendMessageW(hWndList, uMsg, 0, 0); } @@ -1285,7 +1304,9 @@ SetMenuDefaultItem(hMenu, FCIDM_SHVIEW_OPEN, MF_BYCOMMAND); TRACE("-- track popup\n"); - uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD, x, y, 0, m_hWnd, NULL); + uCommand = TrackPopupMenu(hMenu, + TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, + x, y, 0, m_hWnd, NULL); if (uCommand > 0) { @@ -1322,7 +1343,9 @@ CDefFolderMenu_Create2(NULL, NULL, cidl, (LPCITEMIDLIST*)apidl, pSFParent, NULL, 0, NULL, (IContextMenu**)&pCM); pCM->QueryContextMenu(hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); - uCommand = TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RETURNCMD, x, y, 0, m_hWnd, NULL); + uCommand = TrackPopupMenu(hMenu, + TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, + x, y, 0, m_hWnd, NULL); DestroyMenu(hMenu); TRACE("-- (%p)->(uCommand=0x%08x )\n", this, uCommand); @@ -2064,7 +2087,7 @@ } /********************************************************** -* ShellView_DoMeasureItem +* CDefView::OnCustomItem */ LRESULT CDefView::OnCustomItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { @@ -2079,6 +2102,15 @@ return TRUE; else return FALSE; +} + +LRESULT CDefView::OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + /* Wallpaper setting affects drop shadows effect */ + if (wParam == SPI_SETDESKWALLPAPER || wParam == 0) + UpdateListColors(); + + return S_OK; } /**********************************************************
12 years, 10 months
1
0
0
0
[jgardou] 55582: [NTOSKRNL] - Use proper macro for getting PDE from PTE.
by jgardou@svn.reactos.org
Author: jgardou Date: Mon Feb 13 19:09:10 2012 New Revision: 55582 URL:
http://svn.reactos.org/svn/reactos?rev=55582&view=rev
Log: [NTOSKRNL] - Use proper macro for getting PDE from PTE. Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Mon Feb 13 19:09:10 2012 @@ -240,7 +240,7 @@ if (Pfn1->u3.e1.PrototypePte == 1) { /* Get the PDE and make sure it's faulted in */ - PointerPde = MiAddressToPde(PointerPte); + PointerPde = MiPteToPde(PointerPte); if (PointerPde->u.Hard.Valid == 0) { #if (_MI_PAGING_LEVELS == 2)
12 years, 10 months
1
0
0
0
[rharabien] 55581: - Really fix MSVC build...
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Feb 13 17:44:56 2012 New Revision: 55581 URL:
http://svn.reactos.org/svn/reactos?rev=55581&view=rev
Log: - Really fix MSVC build... Modified: trunk/reactos/dll/win32/comctl32/comctl_Es.rc trunk/reactos/dll/win32/comctl32/comctl_Hu.rc trunk/reactos/dll/win32/comctl32/comctl_Pt.rc trunk/reactos/dll/win32/comctl32/comctl_Ro.rc trunk/reactos/dll/win32/comctl32/comctl_Sr.rc trunk/reactos/dll/win32/comctl32/comctl_Zh.rc Modified: trunk/reactos/dll/win32/comctl32/comctl_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Es.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Es.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# es.po (Wine) #-#-#-#-#\n\ -Ninguna\n\ -#-#-#-#-# es.po (Wine) #-#-#-#-#\n\ -Ninguno" + HKY_NONE "Ninguno" } IDD_PROPSHEET DIALOG 0, 0, 220, 140 Modified: trunk/reactos/dll/win32/comctl32/comctl_Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Hu.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Hu.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# hu.po (Wine) #-#-#-#-#\n\ -Nincs\n\ -#-#-#-#-# hu.po (Wine) #-#-#-#-#\n\ -Semmi" + HKY_NONE "Semmi" } IDD_PROPSHEET DIALOG 0, 0, 220, 140 Modified: trunk/reactos/dll/win32/comctl32/comctl_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Pt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Pt.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# pt_PT.po (Wine) #-#-#-#-#\n\ -Nenhum\n\ -#-#-#-#-# pt_PT.po (Wine) #-#-#-#-#\n\ -Nenhuma" + HKY_NONE "Nenhuma" } IDD_PROPSHEET DIALOG 0, 0, 220, 140 Modified: trunk/reactos/dll/win32/comctl32/comctl_Ro.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Ro.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Ro.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# ro.po (Wine) #-#-#-#-#\n\ -FÄrÄ\n\ -#-#-#-#-# ro.po (Wine) #-#-#-#-#\n\ -Niciuna" + HKY_NONE "Niciuna" } IDD_PROPSHEET DIALOG 0, 0, 220, 140 Modified: trunk/reactos/dll/win32/comctl32/comctl_Sr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Sr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Sr.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# sr_RS(a)latin.po (Wine) #-#-#-#-#\n\ -Ništa\n\ -#-#-#-#-# sr_RS(a)latin.po (Wine) #-#-#-#-#\n\ -Nista" + HKY_NONE "Nista" } IDD_PROPSHEET DIALOG 0, 0, 220, 140 Modified: trunk/reactos/dll/win32/comctl32/comctl_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Zh.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Zh.rc [iso-8859-1] Mon Feb 13 17:44:56 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# zh_CN.po (Wine) #-#-#-#-#\n\ -æªå®ä¹\n\ -#-#-#-#-# zh_CN.po (Wine) #-#-#-#-#\n\ -æ " + HKY_NONE "æ " } IDD_PROPSHEET DIALOG 0, 0, 220, 140
12 years, 10 months
1
0
0
0
[rharabien] 55580: - Fix MSVC build
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Feb 13 17:37:27 2012 New Revision: 55580 URL:
http://svn.reactos.org/svn/reactos?rev=55580&view=rev
Log: - Fix MSVC build Modified: trunk/reactos/dll/win32/comctl32/comctl_Cs.rc Modified: trunk/reactos/dll/win32/comctl32/comctl_Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl_Cs.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl_Cs.rc [iso-8859-1] Mon Feb 13 17:37:27 2012 @@ -41,10 +41,7 @@ STRINGTABLE { - HKY_NONE "#-#-#-#-# cs.po (Wine) #-#-#-#-#\n\ -Žádná klávesová zkratka.\n\ -#-#-#-#-# cs.po (Wine) #-#-#-#-#\n\ -Žádný" + HKY_NONE "Žádný" } IDD_PROPSHEET DIALOG 0, 0, 220, 140
12 years, 10 months
1
0
0
0
[rharabien] 55579: - Fix MSVC build (patch by Thomas Fabber reverted by me in previous commit)
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Feb 13 17:04:52 2012 New Revision: 55579 URL:
http://svn.reactos.org/svn/reactos?rev=55579&view=rev
Log: - Fix MSVC build (patch by Thomas Fabber reverted by me in previous commit) Modified: trunk/reactos/dll/win32/comctl32/imagelist.c trunk/reactos/dll/win32/comctl32/monthcal.c Modified: trunk/reactos/dll/win32/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imageli…
============================================================================== --- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Mon Feb 13 17:04:52 2012 @@ -3094,7 +3094,7 @@ if ((ilc >= ILC_COLOR4 && ilc <= ILC_COLOR32) || ilc == ILC_COLOR) { - char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; + char buffer[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; BITMAPINFO *bmi = (BITMAPINFO *)buffer; TRACE("Creating DIBSection %d x %d, %d Bits per Pixel\n", Modified: trunk/reactos/dll/win32/comctl32/monthcal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
============================================================================== --- trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] Mon Feb 13 17:04:52 2012 @@ -160,8 +160,8 @@ /* empty SYSTEMTIME const */ static const SYSTEMTIME st_null; /* valid date limits */ -static const SYSTEMTIME max_allowed_date = { .wYear = 9999, .wMonth = 12, .wDay = 31 }; -static const SYSTEMTIME min_allowed_date = { .wYear = 1752, .wMonth = 9, .wDay = 14 }; +static const SYSTEMTIME max_allowed_date = { /* wYear */ 9999, /* wMonth */ 12, /* wDayOfWeek */ 0, /* wDay */ 31 }; +static const SYSTEMTIME min_allowed_date = { /* wYear */ 1752, /* wMonth */ 9, /* wDayOfWeek */ 0, /* wDay */ 14 }; /* Prev/Next buttons */ enum nav_direction
12 years, 10 months
1
0
0
0
[rharabien] 55578: [COMCTL32] - Add DrawShadowText implementation
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Feb 13 16:53:00 2012 New Revision: 55578 URL:
http://svn.reactos.org/svn/reactos?rev=55578&view=rev
Log: [COMCTL32] - Add DrawShadowText implementation Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/commctrl.c Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Mon Feb 13 16:53:00 2012 @@ -1,3 +1,126 @@ +Index: commctrl.c +=================================================================== +--- commctrl.c (revision 55577) ++++ commctrl.c (working copy) +@@ -1593,12 +1593,114 @@ + * + * Draw text with shadow. + */ +-int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags, ++int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, + COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset) + { +- FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags, +- crText, crShadow, ixOffset, iyOffset); +- return DrawTextW(hdc, pszText, cch, rect, DT_LEFT); ++ COLORREF crOldText; ++ RECT rcText; ++ INT iRet, x, y, x2, y2; ++ BYTE *pBits; ++ HBITMAP hbm, hbmOld; ++ BITMAPINFO bi; ++ HDC hdcMem; ++ HFONT hOldFont; ++ BLENDFUNCTION bf; ++ ++ /* Create 32 bit DIB section for the shadow */ ++ ZeroMemory(&bi, sizeof(bi)); ++ bi.bmiHeader.biSize = sizeof(bi.bmiHeader); ++ bi.bmiHeader.biWidth = prc->right - prc->left + 4; ++ bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB ++ bi.bmiHeader.biPlanes = 1; ++ bi.bmiHeader.biBitCount = 32; ++ bi.bmiHeader.biCompression = BI_RGB; ++ hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0); ++ if(!hbm) ++ { ++ ERR("CreateDIBSection failed\n"); ++ return 0; ++ } ++ ++ /* Create memory device context for new DIB section and select it */ ++ hdcMem = CreateCompatibleDC(hdc); ++ if(!hdcMem) ++ { ++ ERR("CreateCompatibleDC failed\n"); ++ DeleteObject(hbm); ++ return 0; ++ } ++ ++ hbmOld = (HBITMAP)SelectObject(hdcMem, hbm); ++ ++ /* Draw text on our helper bitmap */ ++ hOldFont = (HFONT)SelectObject(hdcMem, GetCurrentObject(hdc, OBJ_FONT)); ++ SetTextColor(hdcMem, RGB(16, 16, 16)); ++ SetBkColor(hdcMem, RGB(0, 0, 0)); ++ SetBkMode(hdcMem, TRANSPARENT); ++ SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top); ++ DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags); ++ SelectObject(hdcMem, hOldFont); ++ ++ /* Flush GDI so data pointed by pBits is valid */ ++ GdiFlush(); ++ ++ /* Set alpha of pixels (forget about colors for now. They will be changed in next loop). ++ We copy text image 4*5 times and each time alpha is added */ ++ for (x = 0; x < bi.bmiHeader.biWidth; ++x) ++ for (y = 0; y < bi.bmiHeader.biHeight; ++y) ++ { ++ BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4]; ++ UINT Alpha = 0; ++ ++ for (x2 = x - 4 + 1; x2 <= x; ++x2) ++ for (y2 = y; y2 < y + 5; ++y2) ++ { ++ if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight) ++ { ++ BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4]; ++ Alpha += pSrc[0]; ++ } ++ } ++ ++ if (Alpha > 255) ++ Alpha = 255; ++ pDest[3] = Alpha; ++ } ++ ++ /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */ ++ for (x = 0; x < bi.bmiHeader.biWidth; ++x) ++ for (y = 0; y < bi.bmiHeader.biHeight; ++y) ++ { ++ BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4]; ++ pDest[0] = GetBValue(crShadow) * pDest[3] / 255; ++ pDest[1] = GetGValue(crShadow) * pDest[3] / 255; ++ pDest[2] = GetRValue(crShadow) * pDest[3] / 255; ++ } ++ ++ /* Fix ixOffset of the shadow (tested on Win) */ ++ ixOffset -= 3; ++ iyOffset -= 3; ++ ++ /* Alpha blend helper image to destination DC */ ++ bf.BlendOp = AC_SRC_OVER; ++ bf.BlendFlags = 0; ++ bf.SourceConstantAlpha = 255; ++ bf.AlphaFormat = AC_SRC_ALPHA; ++ if (!GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf)) ++ ERR("GdiAlphaBlend failed: %lu\n", GetLastError()); ++ ++ /* Delete the helper bitmap */ ++ SelectObject(hdcMem, hbmOld); ++ DeleteObject(hbm); ++ DeleteDC(hdcMem); ++ ++ /* Finally draw the text over shadow */ ++ crOldText = SetTextColor(hdc, crText); ++ SetBkMode(hdc, TRANSPARENT); ++ iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags); ++ SetTextColor(hdc, crOldText); ++ ++ return iRet; + } + + /*********************************************************************** Index: propsheet.c =================================================================== --- propsheet.c (revision 38890) Modified: trunk/reactos/dll/win32/comctl32/commctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/commctr…
============================================================================== --- trunk/reactos/dll/win32/comctl32/commctrl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/commctrl.c [iso-8859-1] Mon Feb 13 16:53:00 2012 @@ -1593,12 +1593,114 @@ * * Draw text with shadow. */ -int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags, +int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset) { - FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags, - crText, crShadow, ixOffset, iyOffset); - return DrawTextW(hdc, pszText, cch, rect, DT_LEFT); + COLORREF crOldText; + RECT rcText; + INT iRet, x, y, x2, y2; + BYTE *pBits; + HBITMAP hbm, hbmOld; + BITMAPINFO bi; + HDC hdcMem; + HFONT hOldFont; + BLENDFUNCTION bf; + + /* Create 32 bit DIB section for the shadow */ + ZeroMemory(&bi, sizeof(bi)); + bi.bmiHeader.biSize = sizeof(bi.bmiHeader); + bi.bmiHeader.biWidth = prc->right - prc->left + 4; + bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB + bi.bmiHeader.biPlanes = 1; + bi.bmiHeader.biBitCount = 32; + bi.bmiHeader.biCompression = BI_RGB; + hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0); + if(!hbm) + { + ERR("CreateDIBSection failed\n"); + return 0; + } + + /* Create memory device context for new DIB section and select it */ + hdcMem = CreateCompatibleDC(hdc); + if(!hdcMem) + { + ERR("CreateCompatibleDC failed\n"); + DeleteObject(hbm); + return 0; + } + + hbmOld = (HBITMAP)SelectObject(hdcMem, hbm); + + /* Draw text on our helper bitmap */ + hOldFont = (HFONT)SelectObject(hdcMem, GetCurrentObject(hdc, OBJ_FONT)); + SetTextColor(hdcMem, RGB(16, 16, 16)); + SetBkColor(hdcMem, RGB(0, 0, 0)); + SetBkMode(hdcMem, TRANSPARENT); + SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top); + DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags); + SelectObject(hdcMem, hOldFont); + + /* Flush GDI so data pointed by pBits is valid */ + GdiFlush(); + + /* Set alpha of pixels (forget about colors for now. They will be changed in next loop). + We copy text image 4*5 times and each time alpha is added */ + for (x = 0; x < bi.bmiHeader.biWidth; ++x) + for (y = 0; y < bi.bmiHeader.biHeight; ++y) + { + BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4]; + UINT Alpha = 0; + + for (x2 = x - 4 + 1; x2 <= x; ++x2) + for (y2 = y; y2 < y + 5; ++y2) + { + if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight) + { + BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4]; + Alpha += pSrc[0]; + } + } + + if (Alpha > 255) + Alpha = 255; + pDest[3] = Alpha; + } + + /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */ + for (x = 0; x < bi.bmiHeader.biWidth; ++x) + for (y = 0; y < bi.bmiHeader.biHeight; ++y) + { + BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4]; + pDest[0] = GetBValue(crShadow) * pDest[3] / 255; + pDest[1] = GetGValue(crShadow) * pDest[3] / 255; + pDest[2] = GetRValue(crShadow) * pDest[3] / 255; + } + + /* Fix ixOffset of the shadow (tested on Win) */ + ixOffset -= 3; + iyOffset -= 3; + + /* Alpha blend helper image to destination DC */ + bf.BlendOp = AC_SRC_OVER; + bf.BlendFlags = 0; + bf.SourceConstantAlpha = 255; + bf.AlphaFormat = AC_SRC_ALPHA; + if (!GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf)) + ERR("GdiAlphaBlend failed: %lu\n", GetLastError()); + + /* Delete the helper bitmap */ + SelectObject(hdcMem, hbmOld); + DeleteObject(hbm); + DeleteDC(hdcMem); + + /* Finally draw the text over shadow */ + crOldText = SetTextColor(hdc, crText); + SetBkMode(hdc, TRANSPARENT); + iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags); + SetTextColor(hdc, crOldText); + + return iRet; } /***********************************************************************
12 years, 10 months
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
58
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Results per page:
10
25
50
100
200