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
2025
January
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
January 2009
----- 2025 -----
January 2025
----- 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
30 participants
755 discussions
Start a n
N
ew thread
[cwittich] 38832: sync credui with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 17 13:09:07 2009 New Revision: 38832 URL:
http://svn.reactos.org/svn/reactos?rev=38832&view=rev
Log: sync credui with wine 1.1.13 Modified: trunk/reactos/dll/win32/credui/credui_Da.rc trunk/reactos/dll/win32/credui/credui_De.rc trunk/reactos/dll/win32/credui/credui_En.rc trunk/reactos/dll/win32/credui/credui_Es.rc trunk/reactos/dll/win32/credui/credui_Fr.rc trunk/reactos/dll/win32/credui/credui_Ko.rc trunk/reactos/dll/win32/credui/credui_Nl.rc trunk/reactos/dll/win32/credui/credui_No.rc trunk/reactos/dll/win32/credui/credui_Pl.rc trunk/reactos/dll/win32/credui/credui_Pt.rc trunk/reactos/dll/win32/credui/credui_Ru.rc trunk/reactos/dll/win32/credui/credui_Si.rc trunk/reactos/dll/win32/credui/credui_Sv.rc trunk/reactos/dll/win32/credui/credui_Zh.rc trunk/reactos/dll/win32/credui/credui_resources.h Modified: trunk/reactos/dll/win32/credui/credui_Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Da…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Da.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Da.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Brugernavn:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Brugernavn:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Kodeord:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Kodeord:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Husk mit kodeord",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_De…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_De.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_De.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Benutzername:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Benutzername:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Kennwort:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Kennwort:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "Kennwort &merken",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_En…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_En.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_En.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&User name:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&User name:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Password:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Password:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Remember my password",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Es…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Es.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Es.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -27,13 +27,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Usuario:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Usuario:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Contraseña:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Contraseña:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Recordar mi contraseña",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Fr…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Fr.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -26,13 +26,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Nom d'utilisateur :",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Nom d'utilisateur :",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,12 - LTEXT "&Mot de passe :",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Mot de passe :",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Se souvenir de mon mot de passe",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Ko…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Ko.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Ko.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -26,13 +26,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 9, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "»ç¿ëÀÚ À̸§(&U):",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "»ç¿ëÀÚ À̸§(&U):",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "¾ÏÈ£(&P):",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "¾ÏÈ£(&P):",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "³» ¾ÏÈ£ ±â¾ï(&R)",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Nl…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Nl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Nl.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Gebruikers naam:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Gebruikers naam:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Wachtwoord:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Wachtwoord:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Onthoudt mijn wachtwoord",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_No…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_No.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_No.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "Br&ukernavn:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "Br&ukernavn:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Passord:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Passord:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Remember my password",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Pl…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Pl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Pl.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -26,13 +26,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&U¿ytkownik:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&U¿ytkownik:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Has³o:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Has³o:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Zapamiêtaj has³o",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Pt…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Pt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Pt.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&User name:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&User name:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Password:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Password:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Lembrar a password",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Ru…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Ru.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Ru.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "Ïî&ëüçîâàòåëü:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "Ïî&ëüçîâàòåëü:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Ïàðîëü:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Ïàðîëü:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "Ñî&õðàíèòü ïàðîëü",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Si…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Si.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Si.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -27,13 +27,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "&Uporabniško ime:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "&Uporabniško ime:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Geslo:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Geslo:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Zapomni si geslo",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Sv…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Sv.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Sv.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -25,13 +25,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 8, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "A&nvändarnamn:",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "A&nvändarnamn:",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "&Lösenord:",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "&Lösenord:",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "&Remember my password",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_Zh…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_Zh.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_Zh.rc [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -28,13 +28,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 9, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "ç¨æ·å(&U):",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "ç¨æ·å(&U):",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "å¯ç (&P):",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "å¯ç (&P):",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "è®°ä½æçå¯ç (&R)",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 @@ -59,13 +59,13 @@ CAPTION "IDS_TITLEFORMAT" FONT 9, "MS Shell Dlg" BEGIN - CONTROL IDB_BANNER,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0, + CONTROL IDB_BANNER,-1,"Static",SS_BITMAP | SS_CENTERIMAGE,0, 0,213,37 LTEXT "IDS_MESSAGEFORMAT",IDC_MESSAGE,8,48,199,8,NOT WS_GROUP - LTEXT "ç¨æ¶å(&U):",IDC_STATIC,8,62,72,12,SS_CENTERIMAGE + LTEXT "ç¨æ¶å(&U):",-1,8,62,72,12,SS_CENTERIMAGE CONTROL "",IDC_USERNAME,"ComboBoxEx32",CBS_DROPDOWN | CBS_NOINTEGRALHEIGHT | WS_TABSTOP,80,62,126,87 - LTEXT "å¯ç¢¼(&P):",IDC_STATIC,8,80,72,12,SS_CENTERIMAGE + LTEXT "å¯ç¢¼(&P):",-1,8,80,72,12,SS_CENTERIMAGE EDITTEXT IDC_PASSWORD,80,80,126,12,ES_PASSWORD | ES_AUTOHSCROLL CONTROL "è¨ä½æçå¯ç¢¼(&R)",IDC_SAVE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,80,98,126,12 Modified: trunk/reactos/dll/win32/credui/credui_resources.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/credui/credui_re…
============================================================================== --- trunk/reactos/dll/win32/credui/credui_resources.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/credui/credui_resources.h [iso-8859-1] Sat Jan 17 13:09:07 2009 @@ -20,8 +20,7 @@ #define IDC_USERNAME 101 #define IDC_PASSWORD 102 #define IDC_MESSAGE 103 -#define IDC_STATIC 104 -#define IDC_SAVE 105 +#define IDC_SAVE 104 #define IDB_BANNER 200
15 years, 11 months
1
0
0
0
[cwittich] 38831: sync cabinet with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 17 12:30:33 2009 New Revision: 38831 URL:
http://svn.reactos.org/svn/reactos?rev=38831&view=rev
Log: sync cabinet with wine 1.1.13 Modified: trunk/reactos/dll/win32/cabinet/cabinet_main.c trunk/reactos/dll/win32/cabinet/fci.c Modified: trunk/reactos/dll/win32/cabinet/cabinet_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/cabinet_…
============================================================================== --- trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] Sat Jan 17 12:30:33 2009 @@ -69,17 +69,17 @@ /* FDI callback functions */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL fdi_open(char *pszFile, int oflag, int pmode) { HANDLE handle; DWORD dwAccess = 0; @@ -120,7 +120,7 @@ return (INT_PTR) handle; } -static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_read(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwRead; @@ -131,7 +131,7 @@ return 0; } -static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_write(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwWritten; @@ -142,13 +142,13 @@ return 0; } -static int fdi_close(INT_PTR hf) +static int CDECL fdi_close(INT_PTR hf) { HANDLE handle = (HANDLE) hf; return CloseHandle(handle) ? 0 : -1; } -static long fdi_seek(INT_PTR hf, long dist, int seektype) +static LONG CDECL fdi_seek(INT_PTR hf, LONG dist, int seektype) { HANDLE handle = (HANDLE) hf; return SetFilePointer(handle, dist, NULL, seektype); @@ -182,7 +182,7 @@ return FALSE; } -static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { switch (fdint) { Modified: trunk/reactos/dll/win32/cabinet/fci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/fci.c?re…
============================================================================== --- trunk/reactos/dll/win32/cabinet/fci.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cabinet/fci.c [iso-8859-1] Sat Jan 17 12:30:33 2009 @@ -1949,7 +1949,7 @@ /* TODO error handling of err */ /* while not all CFFILE structures have been copied to the cabinet do */ - while(!FALSE) { + if (p_fci_internal->data_out) while(!FALSE) { /* REUSE the variable read_result */ /* REUSE the buffer p_fci_internal->data_out AGAIN */ /* read a block from p_fci_internal->handleCFFILE2 */ @@ -2005,7 +2005,7 @@ p_fci_internal->cFiles=0; /* while not all CFDATA structures have been copied to the cabinet do */ - while(!FALSE) { + if (p_fci_internal->data_out) while(!FALSE) { /* REUSE the variable read_result AGAIN */ /* REUSE the buffer p_fci_internal->data_out AGAIN */ /* read a block from p_fci_internal->handleCFDATA2 */
15 years, 11 months
1
0
0
0
[cwittich] 38830: sync cabinet_winetest with wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 17 12:30:21 2009 New Revision: 38830 URL:
http://svn.reactos.org/svn/reactos?rev=38830&view=rev
Log: sync cabinet_winetest with wine 1.1.13 Modified: trunk/rostests/winetests/cabinet/extract.c trunk/rostests/winetests/cabinet/fdi.c Modified: trunk/rostests/winetests/cabinet/extract.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cabinet/extract…
============================================================================== --- trunk/rostests/winetests/cabinet/extract.c [iso-8859-1] (original) +++ trunk/rostests/winetests/cabinet/extract.c [iso-8859-1] Sat Jan 17 12:30:21 2009 @@ -111,33 +111,33 @@ /* the FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -161,7 +161,7 @@ return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -173,7 +173,7 @@ return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -185,7 +185,7 @@ return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -193,7 +193,7 @@ return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -204,7 +204,7 @@ return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -212,7 +212,7 @@ return 0; } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -231,8 +231,8 @@ return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; Modified: trunk/rostests/winetests/cabinet/fdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cabinet/fdi.c?r…
============================================================================== --- trunk/rostests/winetests/cabinet/fdi.c [iso-8859-1] (original) +++ trunk/rostests/winetests/cabinet/fdi.c [iso-8859-1] Sat Jan 17 12:30:21 2009 @@ -32,22 +32,22 @@ /* FDI callbacks */ -static void *fdi_alloc(ULONG cb) +static void * CDECL fdi_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void *fdi_alloc_bad(ULONG cb) +static void * CDECL fdi_alloc_bad(ULONG cb) { return NULL; } -static void fdi_free(void *pv) +static void CDECL fdi_free(void *pv) { HeapFree(GetProcessHeap(), 0, pv); } -static INT_PTR fdi_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL fdi_open(char *pszFile, int oflag, int pmode) { HANDLE handle; handle = CreateFileA(pszFile, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, @@ -57,7 +57,7 @@ return (INT_PTR) handle; } -static UINT fdi_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_read(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwRead; @@ -66,7 +66,7 @@ return 0; } -static UINT fdi_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL fdi_write(INT_PTR hf, void *pv, UINT cb) { HANDLE handle = (HANDLE) hf; DWORD dwWritten; @@ -75,13 +75,13 @@ return 0; } -static int fdi_close(INT_PTR hf) +static int CDECL fdi_close(INT_PTR hf) { HANDLE handle = (HANDLE) hf; return CloseHandle(handle) ? 0 : -1; } -static long fdi_seek(INT_PTR hf, long dist, int seektype) +static LONG CDECL fdi_seek(INT_PTR hf, LONG dist, int seektype) { HANDLE handle = (HANDLE) hf; return SetFilePointer(handle, dist, NULL, seektype); @@ -315,33 +315,33 @@ /* FCI callbacks */ -static void *mem_alloc(ULONG cb) +static void * CDECL mem_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void mem_free(void *memory) +static void CDECL mem_free(void *memory) { HeapFree(GetProcessHeap(), 0, memory); } -static BOOL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) +static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) { return TRUE; } -static long progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) +static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) { return 0; } -static int file_placed(PCCAB pccab, char *pszFile, long cbFile, - BOOL fContinuation, void *pv) +static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, + BOOL fContinuation, void *pv) { return 0; } -static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) { HANDLE handle; DWORD dwAccess = 0; @@ -365,7 +365,7 @@ return (INT_PTR)handle; } -static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwRead; @@ -377,7 +377,7 @@ return dwRead; } -static UINT fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) +static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD dwWritten; @@ -389,7 +389,7 @@ return dwWritten; } -static int fci_close(INT_PTR hf, int *err, void *pv) +static int CDECL fci_close(INT_PTR hf, int *err, void *pv) { HANDLE handle = (HANDLE)hf; ok(CloseHandle(handle), "Failed to CloseHandle\n"); @@ -397,7 +397,7 @@ return 0; } -static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv) +static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) { HANDLE handle = (HANDLE)hf; DWORD ret; @@ -408,7 +408,7 @@ return ret; } -static int fci_delete(char *pszFile, int *err, void *pv) +static int CDECL fci_delete(char *pszFile, int *err, void *pv) { BOOL ret = DeleteFileA(pszFile); ok(ret, "Failed to DeleteFile %s\n", pszFile); @@ -416,7 +416,7 @@ return 0; } -static BOOL get_temp_file(char *pszTempName, int cbTempName, void *pv) +static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) { LPSTR tempname; @@ -435,8 +435,8 @@ return FALSE; } -static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) +static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, + USHORT *pattribs, int *err, void *pv) { BY_HANDLE_FILE_INFORMATION finfo; FILETIME filetime; @@ -544,11 +544,11 @@ /* invalid file handle */ ZeroMemory(&cabinfo, sizeof(FDICABINETINFO)); SetLastError(0xdeadbeef); - ret = FDIIsCabinet(hfdi, (int)INVALID_HANDLE_VALUE, &cabinfo); + ret = FDIIsCabinet(hfdi, -1, &cabinfo); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %ld\n", cabinfo.cbCabinet); + ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); @@ -563,7 +563,7 @@ ret = FDIIsCabinet(hfdi, fd, &cabinfo); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %ld\n", cabinfo.cbCabinet); + ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); @@ -584,7 +584,7 @@ ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID); todo_wine { - ok(cabinfo.cbCabinet == 182, "Expected 182, got %ld\n", cabinfo.cbCabinet); + ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet); ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); }
15 years, 11 months
1
0
0
0
[gedmurphy] 38829: update comctl32 winetest
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Sat Jan 17 11:42:01 2009 New Revision: 38829 URL:
http://svn.reactos.org/svn/reactos?rev=38829&view=rev
Log: update comctl32 winetest Modified: trunk/rostests/winetests/comctl32/comboex.c trunk/rostests/winetests/comctl32/datetime.c trunk/rostests/winetests/comctl32/dpa.c trunk/rostests/winetests/comctl32/header.c trunk/rostests/winetests/comctl32/imagelist.c trunk/rostests/winetests/comctl32/listview.c trunk/rostests/winetests/comctl32/monthcal.c trunk/rostests/winetests/comctl32/mru.c trunk/rostests/winetests/comctl32/propsheet.c trunk/rostests/winetests/comctl32/status.c trunk/rostests/winetests/comctl32/subclass.c trunk/rostests/winetests/comctl32/tab.c trunk/rostests/winetests/comctl32/toolbar.c trunk/rostests/winetests/comctl32/tooltips.c trunk/rostests/winetests/comctl32/trackbar.c trunk/rostests/winetests/comctl32/treeview.c trunk/rostests/winetests/comctl32/updown.c Modified: trunk/rostests/winetests/comctl32/comboex.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/comboe…
============================================================================== --- trunk/rostests/winetests/comctl32/comboex.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/comboex.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -183,6 +183,13 @@ WCHAR buffer[3]; static const UINT choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72}; static const WCHAR stringFormat[] = {'%','2','d','\0'}; + BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); + + pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); + if (!pGetComboBoxInfo){ + skip("GetComboBoxInfo is not available\n"); + return; + } hComboEx = CreateWindowExA(0, WC_COMBOBOXEXA, NULL, WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, 0, 0, 200, 150, @@ -205,7 +212,7 @@ hEdit = (HWND)SendMessage(hComboEx, CBEM_GETEDITCONTROL, 0, 0); cbInfo.cbSize = sizeof(COMBOBOXINFO); - result = SendMessage(hCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbInfo); + result = pGetComboBoxInfo(hCombo, &cbInfo); ok(result, "Failed to get combobox info structure. LastError=%d\n", GetLastError()); hList = cbInfo.hwndList; @@ -221,7 +228,8 @@ result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", GetLastError()); - ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo || + broken(GetFocus() != hCombo), /* win98 */ "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), @@ -232,7 +240,8 @@ result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); - ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo || + broken(GetFocus() != hCombo), /* win98 */ "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); @@ -244,14 +253,16 @@ result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", GetLastError()); - ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo || + broken(GetFocus() != hCombo), /* win98 */ "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", GetLastError()); - ok(GetFocus() == hCombo, + ok(GetFocus() == hCombo || + broken(GetFocus() != hCombo), /* win98 */ "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", GetFocus()); ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), @@ -260,13 +271,19 @@ result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", GetLastError()); - todo_wine ok(GetFocus() == hEdit, + todo_wine ok(GetFocus() == hEdit || + broken(GetFocus() == hCombo), /* win98 */ "Focus not on ComboBoxEx's Edit Control, instead on %p\n", GetFocus()); - ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), + + result = SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0); + ok(!result || + broken(result != 0), /* win98 */ "The dropdown list should have been rolled up.\n"); idx = SendMessage(hComboEx, CB_GETCURSEL, 0, 0); - ok(idx == 4, "Current Selection: expected %d, got %d\n", 4, idx); + ok(idx == 4 || + broken(idx == -1), /* win98 */ + "Current Selection: expected %d, got %d\n", 4, idx); DestroyWindow(hComboEx); } @@ -334,6 +351,7 @@ DispatchMessageA(&msg); } + DestroyWindow(hComboExParentWnd); UnregisterClassA(ComboExTestClass, GetModuleHandleA(NULL)); } Modified: trunk/rostests/winetests/comctl32/datetime.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/dateti…
============================================================================== --- trunk/rostests/winetests/comctl32/datetime.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/datetime.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -197,7 +197,7 @@ SYSTEMTIME systime; LRESULT r; - r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL); + r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, 0); expect(1, r); r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, @@ -256,7 +256,7 @@ { HFONT hFontOrig, hFontNew; - hFontOrig = (HFONT)GetStockObject(DEFAULT_GUI_FONT); + hFontOrig = GetStockObject(DEFAULT_GUI_FONT); SendMessage(hWndDateTime, DTM_SETMCFONT, (WPARAM)hFontOrig, TRUE); hFontNew = (HFONT)SendMessage(hWndDateTime, DTM_GETMCFONT, 0, 0); ok(hFontOrig == hFontNew, "Expected hFontOrig==hFontNew, hFontOrig=%p, hFontNew=%p\n", hFontOrig, hFontNew); @@ -271,7 +271,7 @@ todo_wine { r = SendMessage(hWndDateTime, DTM_GETMONTHCAL, 0, 0); - ok(r == (LPARAM)NULL, "Expected NULL(no child month calendar control), got %ld\n", r); + ok(r == 0, "Expected NULL(no child month calendar control), got %ld\n", r); } ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_get_monthcal_seq, "test_dtm_get_monthcal", FALSE); Modified: trunk/rostests/winetests/comctl32/dpa.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/dpa.c?…
============================================================================== --- trunk/rostests/winetests/comctl32/dpa.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/dpa.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -25,7 +25,6 @@ #include "windef.h" #include "winbase.h" -#include "wingdi.h" #include "winuser.h" #include "commctrl.h" #include "objidl.h" @@ -183,7 +182,7 @@ do { - pDPA_InsertPtr(dpa, 0, (PVOID)(dwIn & 0xf)); + pDPA_InsertPtr(dpa, 0, (PVOID)(ULONG_PTR)(dwIn & 0xf)); dwIn >>= 4; } while(dwIn); @@ -243,9 +242,9 @@ for(i = 1; i <= 6; i++) { INT j, k; - k = pDPA_GetPtrIndex(dpa, (PVOID)i); + k = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); /* Linear searches should work on unsorted DPAs */ - j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, 0); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, 0); ok(j == k, "j=%d k=%d\n", j, k); } @@ -280,16 +279,16 @@ INT j; /* The array is in order so ptr == index+1 */ - j = pDPA_GetPtrIndex(dpa, (PVOID)i); + j = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); ok(j+1 == i, "j=%d i=%d\n", j, i); - j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); ok(j+1 == i, "j=%d i=%d\n", j, i); /* Linear searches respect iStart ... */ - j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, 0); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, 0); ok(j == DPA_ERR, "j=%d\n", j); /* ... but for a binary search it's ignored */ - j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); + j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); todo_wine ok(j+1 == i, "j=%d i=%d\n", j, i); } @@ -332,7 +331,7 @@ * should be bogus */ for(i = 0; i < 6; i++) { - INT j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpGT, 0xdeadbeef, + INT j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpGT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTBEFORE); ok(j != i, "i=%d\n", i); } @@ -364,7 +363,9 @@ rc=CheckDPA(dpa, 0x123456, &dw); ok(rc, "dw=0x%x\n", dw); rc=CheckDPA(dpa2, 0x123456, &dw2); - ok(rc, "dw2=0x%x\n", dw2); + ok(rc || + broken(!rc), /* win98 */ + "dw2=0x%x\n", dw2); rc=CheckDPA(dpa3, 0x123456, &dw3); ok(rc, "dw3=0x%x\n", dw3); } @@ -453,5 +454,5 @@ if(InitFunctionPtrs(hcomctl32)) test_dpa(); else - trace("skipping tests\n"); -} + win_skip("Needed functions are not available\n"); +} Modified: trunk/rostests/winetests/comctl32/header.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/header…
============================================================================== --- trunk/rostests/winetests/comctl32/header.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/header.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -39,6 +39,7 @@ static int g_CustomDrawCount; static DRAWITEMSTRUCT g_DrawItem; static BOOL g_DrawItemReceived; +static DWORD g_customheight; static EXPECTEDNOTIFY expectedNotify[10]; static INT nExpectedNotify = 0; @@ -89,7 +90,7 @@ static const struct message add_header_to_parent_seq[] = { { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent }, + { WM_QUERYUISTATE, sent|optional }, { WM_PARENTNOTIFY, sent }, { 0 } }; @@ -196,8 +197,8 @@ { HDM_SETFILTERCHANGETIMEOUT, sent|wparam|lparam, 1, 100 }, { HDM_CLEARFILTER, sent|wparam|lparam, 0, 1 }, { HDM_EDITFILTER, sent|wparam|lparam, 1, 0 }, - { WM_PARENTNOTIFY, sent|wparam|defwinproc, WM_CREATE }, - { WM_COMMAND, sent|defwinproc }, + { WM_PARENTNOTIFY, sent|wparam|defwinproc|optional, WM_CREATE }, + { WM_COMMAND, sent|defwinproc|optional }, { 0 } }; @@ -304,11 +305,11 @@ static void addReadDelItem(HWND hdex, HDITEMA *phdiCreate, int maskRead, HDITEMA *phdiRead) { - ok(SendMessage(hdex, HDM_INSERTITEMA, (WPARAM)0, (LPARAM)phdiCreate)!=-1, "Adding item failed\n"); + ok(SendMessage(hdex, HDM_INSERTITEMA, 0, (LPARAM)phdiCreate)!=-1, "Adding item failed\n"); ZeroMemory(phdiRead, sizeof(HDITEMA)); phdiRead->mask = maskRead; - ok(SendMessage(hdex, HDM_GETITEMA, (WPARAM)0, (LPARAM)phdiRead)!=0, "Getting item data failed\n"); - ok(SendMessage(hdex, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0)!=0, "Deleting item failed\n"); + ok(SendMessage(hdex, HDM_GETITEMA, 0, (LPARAM)phdiRead)!=0, "Getting item data failed\n"); + ok(SendMessage(hdex, HDM_DELETEITEM, 0, 0)!=0, "Deleting item failed\n"); } static HWND create_header_control (void) @@ -465,7 +466,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Header test parent class"; @@ -661,24 +662,24 @@ hdi.iOrder = 0; hdi.lParam = 17; hdi.cchTextMax = 260; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); ok(ret == -1, "Creating an item with a zero mask should have failed\n"); - if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); /* with a non-zero mask creation will succeed */ ZeroMemory(&hdi, sizeof(hdi)); hdi.mask = HDI_LPARAM; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); ok(ret != -1, "Adding item with non-zero mask failed\n"); if (ret != -1) - SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); /* in SETITEM if the mask contains a unknown bit, it is ignored */ ZeroMemory(&hdi, sizeof(hdi)); hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; hdi.lParam = 133; hdi.iImage = 17; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); ok(ret != -1, "Adding item failed\n"); if (ret != -1) @@ -686,18 +687,18 @@ /* check result */ ZeroMemory(&hdi, sizeof(hdi)); hdi.mask = HDI_LPARAM | HDI_IMAGE; - SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi); + SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi); ok(hdi.lParam == 133, "comctl32 4.0 field not set\n"); ok(hdi.iImage == 17, "comctl32 >4.0 field not set\n"); /* but in GETITEM if an unknown bit is set, comctl32 uses only version 4.0 fields */ ZeroMemory(&hdi, sizeof(hdi)); hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; - SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi); + SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi); ok(hdi.lParam == 133, "comctl32 4.0 field not read\n"); ok(hdi.iImage == 0, "comctl32 >4.0 field shouldn't be read\n"); - SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); } } @@ -811,7 +812,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); retVal = SendMessage(hChild, HDM_GETITEMRECT, 1, (LPARAM) &rect); ok(retVal == TRUE, "Getting item rect should TRUE, got %d\n", retVal); @@ -821,7 +822,7 @@ expect(160, rect.right); todo_wine { - expect(18, rect.bottom); + expect(g_customheight, rect.bottom); } retVal = SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM) &rect); @@ -833,7 +834,7 @@ expect(80, rect.right); todo_wine { - expect(18, rect.bottom); + expect(g_customheight, rect.bottom); } retVal = SendMessage(hChild, HDM_GETITEMRECT, 10, (LPARAM) &rect); ok(retVal == 0, "Getting rect of nonexistent item should return 0, got %d\n", retVal); @@ -855,7 +856,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_LAYOUT, 0, (LPARAM) &hdLayout); @@ -874,7 +875,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_ORDERTOINDEX, 1, 0); @@ -892,7 +893,7 @@ HDHITTESTINFO hdHitTestInfo; const int firstItemRightBoundary = 80; const int secondItemRightBoundary = 160; - const int bottomBoundary = 18; + const int bottomBoundary = g_customheight; pt.x = firstItemRightBoundary - 1; pt.y = bottomBoundary - 1; @@ -902,7 +903,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo); @@ -947,12 +948,12 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); todo_wine { - retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, (LPARAM) 0X00050005); + retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, 0X00050005); expect(0, retVal); } retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 100); @@ -978,18 +979,18 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_SETIMAGELIST, 0, (LPARAM) hImageList); - ok(hImageListRetVal == NULL, "Expected NULL, got %d\n", (int) hImageListRetVal); + ok(hImageListRetVal == NULL, "Expected NULL, got %p\n", hImageListRetVal); hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_GETIMAGELIST, 0, 0); - ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %d\n", (int) hImageListRetVal); + ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %p\n", hImageListRetVal); hImageListRetVal = (HIMAGELIST) SendMessage(hChild, HDM_CREATEDRAGIMAGE, 0, 0); - ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %d\n", (int) hImageListRetVal); + ok(hImageListRetVal != NULL, "Expected non-NULL handle, got %p\n", hImageListRetVal); ok_sequence(sequences, HEADER_SEQ_INDEX, imageMessages_seq, "imageMessages sequence testing", FALSE); @@ -999,35 +1000,45 @@ static void test_hdm_filterMessages(HWND hParent) { HWND hChild; - int retVal; + int retVal, timeout; flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); assert(hChild); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); + "adder header control to parent", FALSE); + + timeout = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); + SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + /* msdn incorrectly states that return value + * is the index of the filter control being + * modified. The sendMessage here should + * return previous filter timeout value + */ + + retVal = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); + expect(timeout, retVal); + todo_wine { - /* msdn incorrectly states that return value - * is the index of the filter control being - * modified. The sendMessage here should - * return previous filter timeout value - */ - retVal = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); - expect(1000, retVal); retVal = SendMessage(hChild, HDM_CLEARFILTER, 0, 1); expect(1, retVal); retVal = SendMessage(hChild, HDM_EDITFILTER, 1, 0); expect(1, retVal); - } + } if (winetest_interactive) ok_sequence(sequences, HEADER_SEQ_INDEX, filterMessages_seq_interactive, "filterMessages sequence testing", TRUE); else ok_sequence(sequences, HEADER_SEQ_INDEX, filterMessages_seq_noninteractive, - "filterMessages sequence testing", TRUE); + "filterMessages sequence testing", FALSE); + /* Some Win9x versions don't send a WM_KILLFOCUS. + * Set the focus explicitly to the parent to avoid a crash. + */ + SetFocus(hParent); DestroyWindow(hChild); } @@ -1040,7 +1051,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_SETUNICODEFORMAT, TRUE, 0); @@ -1061,7 +1072,7 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, TRUE); ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); retVal = SendMessage(hChild, HDM_GETBITMAPMARGIN, 0, 0); @@ -1100,7 +1111,7 @@ "adder header control to parent", TRUE); else ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", TRUE); + "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); for ( loopcnt = 0 ; loopcnt < 4 ; loopcnt++ ) { @@ -1196,7 +1207,7 @@ { case 0: /* don't test dwItemSpec - it's 0 no comctl5 but 1308756 on comctl6 */ - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); return 0; } @@ -1214,16 +1225,16 @@ switch (n) { case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); return CDRF_NOTIFYITEMDRAW; case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); return 0; case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, g_customheight); return 0; case 3: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); return 0; } @@ -1241,19 +1252,19 @@ switch (n) { case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); return CDRF_NOTIFYITEMDRAW|CDRF_NOTIFYPOSTERASE|CDRF_NOTIFYPOSTPAINT|CDRF_SKIPDEFAULT; case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); return 0; case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, g_customheight); return 0; case 3: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); return 0; case 4: - TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, g_customheight); return 0; } @@ -1272,16 +1283,16 @@ switch (n) { case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); return CDRF_NOTIFYITEMDRAW|CDRF_NOTIFYPOSTPAINT; case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); return 0; case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, 18); + TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); return 0; case 3: - TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, 18); + TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, g_customheight); return 0; } @@ -1307,9 +1318,9 @@ CHAR name[] = "Test"; hWndHeader = create_header_control(); GetClientRect(hWndHeader, &rect); - ok(rect.right - rect.left == 670 && rect.bottom - rect.top == 18, - "Tests will fail as header size is %dx%d instead of 670x18\n", - rect.right - rect.left, rect.bottom - rect.top); + ok(rect.right - rect.left == 670 && rect.bottom - rect.top == g_customheight, + "Tests will fail as header size is %dx%d instead of 670x%d\n", + rect.right - rect.left, rect.bottom - rect.top, g_customheight); for (i = 0; i < 3; i++) { @@ -1486,6 +1497,9 @@ BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); WNDCLASSA wc; INITCOMMONCONTROLSEX iccex; + TEXTMETRICA tm; + HFONT hOldFont; + HDC hdc; hComctl32 = GetModuleHandleA("comctl32.dll"); pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); @@ -1511,6 +1525,17 @@ wc.lpfnWndProc = HeaderTestWndProc; RegisterClassA(&wc); + /* The height of the header control depends on the height of the system font. + The height of the system font is dpi dependent */ + hdc = GetDC(0); + hOldFont = SelectObject(hdc, GetStockObject(SYSTEM_FONT)); + GetTextMetricsA(hdc, &tm); + /* 2 dot extra space are needed for the border */ + g_customheight = tm.tmHeight + 2; + trace("customdraw height: %d (dpi: %d)\n", g_customheight, GetDeviceCaps(hdc, LOGPIXELSY)); + SelectObject(hdc, hOldFont); + ReleaseDC(0, hdc); + hHeaderParentWnd = CreateWindowExA(0, "HeaderTestClass", "Header test", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), Modified: trunk/rostests/winetests/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/imagel…
============================================================================== --- trunk/rostests/winetests/comctl32/imagelist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/imagelist.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -136,9 +136,9 @@ cls.cbClsExtra = 0; cls.cbWndExtra = 0; cls.hInstance = 0; - cls.hIcon = LoadIconA (0, (LPSTR)IDI_APPLICATION); - cls.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); - cls.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); + cls.hIcon = LoadIconA (0, IDI_APPLICATION); + cls.hCursor = LoadCursorA (0, IDC_ARROW); + cls.hbrBackground = GetStockObject (WHITE_BRUSH); cls.lpszMenuName = 0; cls.lpszClassName = className; @@ -433,7 +433,7 @@ if (!pImageList_DrawIndirect) { - trace("ImageList_DrawIndirect not available, skipping test\n"); + win_skip("ImageList_DrawIndirect not available, skipping test\n"); return TRUE; } @@ -835,10 +835,18 @@ ok(ilh->cy == cy, "wrong cy %d (expected %d)\n", ilh->cy, cy); ok(ilh->bkcolor == CLR_NONE, "wrong bkcolor %x\n", ilh->bkcolor); ok(ilh->flags == ILC_COLOR24, "wrong flags %04x\n", ilh->flags); - ok(ilh->ovls[0] == -1, "wrong ovls[0] %04x\n", ilh->ovls[0]); - ok(ilh->ovls[1] == -1, "wrong ovls[1] %04x\n", ilh->ovls[1]); - ok(ilh->ovls[2] == -1, "wrong ovls[2] %04x\n", ilh->ovls[2]); - ok(ilh->ovls[3] == -1, "wrong ovls[3] %04x\n", ilh->ovls[3]); + ok(ilh->ovls[0] == -1 || + ilh->ovls[0] == 0, /* win95 */ + "wrong ovls[0] %04x\n", ilh->ovls[0]); + ok(ilh->ovls[1] == -1 || + ilh->ovls[1] == 0, /* win95 */ + "wrong ovls[1] %04x\n", ilh->ovls[1]); + ok(ilh->ovls[2] == -1 || + ilh->ovls[2] == 0, /* win95 */ + "wrong ovls[2] %04x\n", ilh->ovls[2]); + ok(ilh->ovls[3] == -1 || + ilh->ovls[3] == 0, /* win95 */ + "wrong ovls[3] %04x\n", ilh->ovls[3]); } static HBITMAP create_bitmap(INT cx, INT cy, COLORREF color, const char *comment) Modified: trunk/rostests/winetests/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/listvi…
============================================================================== --- trunk/rostests/winetests/comctl32/listview.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/listview.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -48,7 +48,10 @@ { WM_CREATE, sent }, { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, + { WM_QUERYNEWPALETTE, sent|optional }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, + { WM_WINDOWPOSCHANGED, sent|optional }, + { WM_NCCALCSIZE, sent|wparam|optional, 1 }, { WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 }, { WM_ACTIVATE, sent|wparam, 1 }, @@ -75,9 +78,9 @@ }; static const struct message listview_icon_spacing_seq[] = { - { LVM_SETICONSPACING, sent|lparam, 0, (LPARAM) MAKELONG(20, 30) }, - { LVM_SETICONSPACING, sent|lparam, 0, (LPARAM) MAKELONG(25, 35) }, - { LVM_SETICONSPACING, sent|lparam, 0, (LPARAM) MAKELONG(-1, -1) }, + { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(20, 30) }, + { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(25, 35) }, + { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(-1, -1) }, { 0 } }; @@ -154,8 +157,9 @@ LRESULT ret; struct message msg; - /* do not log painting messages */ - if (message != WM_PAINT && + /* log system messages, except for painting */ + if (message < WM_USER && + message != WM_PAINT && message != WM_ERASEBKGND && message != WM_NCPAINT && message != WM_NCHITTEST && @@ -190,7 +194,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Listview test parent class"; @@ -732,7 +736,9 @@ /* Check its width */ rc = ListView_GetColumnWidth(hwnd, 0); - ok(rc==10, "Inserting column with no mask failed to set width to 10 with %d\n", rc); + ok(rc==10 || + broken(rc==0), /* win9x */ + "Inserting column with no mask failed to set width to 10 with %d\n", rc); DestroyWindow(hwnd); } @@ -859,21 +865,27 @@ r = SendMessage(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwndparent, (LPARAM)NF_REQUERY); expect(NFR_ANSI, r); - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, (LPARAM) MAKELONG(-1, -1)); + /* reset the icon spacing to defaults */ + SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1, -1)); + + /* now we can request what the defaults are */ + r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1, -1)); w = LOWORD(r); - h = LOWORD(r); + h = HIWORD(r); flush_sequences(sequences, NUM_MSG_SEQUENCES); trace("test icon spacing\n"); - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, (LPARAM) MAKELONG(20, 30)); - expect(MAKELONG(w,h), r); - - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, (LPARAM) MAKELONG(25, 35)); + r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(20, 30)); + ok(r == MAKELONG(w, h) || + broken(r == MAKELONG(w, w)), /* win98 */ + "Expected %d, got %d\n", MAKELONG(w, h), r); + + r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(25, 35)); expect(MAKELONG(20,30), r); - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, (LPARAM) MAKELONG(-1,-1)); + r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1,-1)); expect(MAKELONG(25,35), r); ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_icon_spacing_seq, "test icon spacing seq", FALSE); @@ -977,7 +989,7 @@ expect(3, r); /* [item0, item1] */ - r = SendMessage(hwnd, LVM_DELETEITEM, (WPARAM) 2, 0); + r = SendMessage(hwnd, LVM_DELETEITEM, 2, 0); expect(TRUE, r); r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); Modified: trunk/rostests/winetests/comctl32/monthcal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/monthc…
============================================================================== --- trunk/rostests/winetests/comctl32/monthcal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/monthcal.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -23,7 +23,6 @@ #include "windef.h" #include "winbase.h" -#include "wingdi.h" #include "winuser.h" #include "commctrl.h" @@ -53,6 +52,7 @@ { WM_CREATE, sent }, { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, + { WM_QUERYNEWPALETTE, sent|optional }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 }, @@ -70,7 +70,7 @@ static const struct message create_monthcal_control_seq[] = { { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent }, + { WM_QUERYUISTATE, sent|optional }, { WM_GETFONT, sent }, { WM_PARENTNOTIFY, sent|wparam, WM_CREATE}, { 0 } @@ -78,7 +78,7 @@ static const struct message create_monthcal_multi_sel_style_seq[] = { { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent }, + { WM_QUERYUISTATE, sent|optional }, { WM_GETFONT, sent }, { 0 } }; @@ -202,10 +202,6 @@ static const struct message monthcal_hit_test_seq[] = { { MCM_SETCURSEL, sent|wparam, 0}, { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, { MCM_HITTEST, sent|wparam, 0}, { MCM_HITTEST, sent|wparam, 0}, { MCM_HITTEST, sent|wparam, 0}, @@ -302,8 +298,10 @@ { 0x0090, sent|optional }, /* Vista */ { WM_WINDOWPOSCHANGING, sent|wparam, 0}, { WM_WINDOWPOSCHANGED, sent|wparam, 0}, - { WM_NCACTIVATE, sent|wparam|lparam, 0, 0}, - { WM_ACTIVATE, sent|wparam|lparam, 0, 0}, + { WM_NCACTIVATE, sent|wparam, 0}, + { WM_ACTIVATE, sent|wparam, 0}, + { WM_NCACTIVATE, sent|wparam|lparam|optional, 0, 0}, + { WM_ACTIVATE, sent|wparam|lparam|optional, 0, 0}, { WM_ACTIVATEAPP, sent|wparam, 0}, { WM_KILLFOCUS, sent|wparam|lparam, 0, 0}, { WM_IME_SETCONTEXT, sent|wparam|optional, 0}, @@ -383,8 +381,9 @@ LRESULT ret; struct message msg; - /* do not log painting messages */ - if (message != WM_PAINT && + /* log system messages, except for painting */ + if (message < WM_USER && + message != WM_PAINT && message != WM_ERASEBKGND && message != WM_NCPAINT && message != WM_NCHITTEST && @@ -419,7 +418,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Month-Cal test parent class"; @@ -459,8 +458,6 @@ static long defwndproc_counter = 0; LRESULT ret; struct message msg; - - trace("monthcal: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); msg.message = message; msg.flags = sent|wparam|lparam; @@ -636,7 +633,7 @@ expect(st_original.wSecond, st_new.wSecond); /* lparam cannot be NULL */ - res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM) NULL); + res = SendMessage(hwnd, MCM_GETCURSEL, 0, 0); expect(0, res); ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_curr_date_seq, "monthcal currDate", TRUE); @@ -654,6 +651,7 @@ /* check for locale first day */ if(GetLocaleInfo(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){ fday = atoi(b); + trace("fday: %d\n", fday); res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0); expect(fday, res); prev = fday; @@ -669,7 +667,8 @@ if (i == -1){ expect(MAKELONG(fday, FALSE), res); }else if (i >= 7){ - expect(MAKELONG(fday, TRUE), res); + /* out of range sets max first day of week, locale is ignored */ + expect(MAKELONG(6, TRUE), res); }else{ expect(MAKELONG(i, TRUE), res); } @@ -722,6 +721,12 @@ MCHITTESTINFO mchit; UINT res; SYSTEMTIME st; + LONG x; + UINT title_index; + static const UINT title_hits[] = + { MCHT_NOWHERE, MCHT_TITLEBK, MCHT_TITLEBTNPREV, MCHT_TITLEBK, + MCHT_TITLEMONTH, MCHT_TITLEBK, MCHT_TITLEYEAR, MCHT_TITLEBK, + MCHT_TITLEBTNNEXT, MCHT_TITLEBK, MCHT_NOWHERE }; memset(&mchit, 0, sizeof(MCHITTESTINFO)); @@ -776,42 +781,6 @@ expect(mchit.uHit, res); expect(MCHT_CALENDARBK, res); - /* (50, 40) is in active area - previous month button */ - mchit.pt.x = 50; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(50, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEBTNPREV, res);} - - /* (90, 40) is in active area - background section of the title */ - mchit.pt.x = 90; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(90, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLE, res);} - - /* (140, 40) is in active area - month section of the title */ - mchit.pt.x = 140; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(140, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEMONTH, res);} - - /* (250, 40) is in active area - next month button */ - mchit.pt.x = 250; - mchit.pt.y = 40; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(250, mchit.pt.x); - expect(40, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine {expect(MCHT_TITLEBTNNEXT, res);} - /* (70, 70) is in active area - day of the week */ mchit.pt.x = 70; mchit.pt.y = 70; @@ -905,6 +874,27 @@ todo_wine {expect(MCHT_TODAYLINK, res);} ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_hit_test_seq, "monthcal hit test", TRUE); + + /* The horizontal position of title bar elements depends on locale (y pos + is constant), so we sample across a horizontal line and make sure we + find all elements. */ + mchit.pt.y = 40; + title_index = 0; + for (x = 0; x < 300; x++){ + mchit.pt.x = x; + res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); + expect(x, mchit.pt.x); + expect(40, mchit.pt.y); + expect(mchit.uHit, res); + if (res != title_hits[title_index]){ + title_index++; + if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index) + break; + todo_wine {expect(title_hits[title_index], res);} + } + } + todo_wine {ok(300 <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]), + "Wrong title layout\n");} } static void test_monthcal_todaylink(HWND hwnd) @@ -1107,6 +1097,34 @@ ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_max_sel_day_seq, "monthcal MaxSelDay", FALSE); } +static void test_monthcal_size(HWND hwnd) +{ + int res; + RECT r1, r2; + HFONT hFont1, hFont2; + LOGFONTA logfont; + + lstrcpyA(logfont.lfFaceName, "Arial"); + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + hFont1 = CreateFontIndirectA(&logfont); + + logfont.lfHeight = 24; + hFont2 = CreateFontIndirectA(&logfont); + + /* initialize to a font we can compare against */ + SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont1, 0); + res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r1); + + /* check that setting a larger font results in an larger rect */ + SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont2, 0); + res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r2); + + OffsetRect(&r1, -r1.left, -r1.top); + OffsetRect(&r2, -r2.left, -r2.top); + + ok(r1.bottom < r2.bottom, "Failed to get larger rect with larger font\n"); +} START_TEST(monthcal) { @@ -1148,6 +1166,7 @@ test_monthcal_monthrange(hwnd); test_monthcal_HitTest(hwnd); test_monthcal_todaylink(hwnd); + test_monthcal_size(hwnd); flush_sequences(sequences, NUM_MSG_SEQUENCES); DestroyWindow(hwnd); Modified: trunk/rostests/winetests/comctl32/mru.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/mru.c?…
============================================================================== --- trunk/rostests/winetests/comctl32/mru.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/mru.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -75,7 +75,7 @@ /* Based on RegDeleteTreeW from dlls/advapi32/registry.c */ -static LONG mru_RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) +static LSTATUS mru_RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) { LONG ret; DWORD dwMaxSubkeyLen, dwMaxValueLen; @@ -353,15 +353,15 @@ /* NULL buffer = get list size */ iRet = pEnumMRUList(hMRU, 0, NULL, 0); - ok(iRet == 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE, iRet); + ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); /* negative item pos = get list size */ iRet = pEnumMRUList(hMRU, -1, NULL, 0); - ok(iRet == 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE, iRet); + ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); /* negative item pos = get list size */ iRet = pEnumMRUList(hMRU, -5, NULL, 0); - ok(iRet == 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE, iRet); + ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); /* negative item pos = get list size */ iRet = pEnumMRUList(hMRU, -1, buffer, 255); @@ -410,8 +410,7 @@ pFreeMRUList(hMRU); } - /* Free (NULL list) - Doesn't crash */ - pFreeMRUList(NULL); + /* FreeMRUList(NULL) crashes on Win98 OSR0 */ } START_TEST(mru) Modified: trunk/rostests/winetests/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/propsh…
============================================================================== --- trunk/rostests/winetests/comctl32/propsheet.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/propsheet.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -21,6 +21,8 @@ #include <commctrl.h> #include "wine/test.h" + +static HWND parent; static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam) { @@ -132,8 +134,74 @@ DestroyWindow(hdlg); } +static int CALLBACK disableowner_callback(HWND hwnd, UINT msg, LPARAM lparam) +{ + switch(msg) + { + case PSCB_INITIALIZED: + { + ok(IsWindowEnabled(parent) == 0, "parent window should be disabled\n"); + PostQuitMessage(0); + return FALSE; + } + } + return FALSE; +} + +static void register_parent_wnd_class(void) +{ + WNDCLASSA cls; + + cls.style = 0; + cls.lpfnWndProc = DefWindowProcA; + cls.cbClsExtra = 0; + cls.cbWndExtra = 0; + cls.hInstance = GetModuleHandleA(NULL); + cls.hIcon = 0; + cls.hCursor = LoadCursorA(0, IDC_ARROW); + cls.hbrBackground = GetStockObject(WHITE_BRUSH); + cls.lpszMenuName = NULL; + cls.lpszClassName = "parent class"; + RegisterClassA(&cls); +} + +static void test_disableowner(void) +{ + HPROPSHEETPAGE hpsp[1]; + PROPSHEETPAGEA psp; + PROPSHEETHEADERA psh; + + register_parent_wnd_class(); + parent = CreateWindowA("parent class", "", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 100, 100, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), 0); + + memset(&psp, 0, sizeof(psp)); + psp.dwSize = sizeof(psp); + psp.dwFlags = 0; + psp.hInstance = GetModuleHandleW(NULL); + U(psp).pszTemplate = "prop_page1"; + U2(psp).pszIcon = NULL; + psp.pfnDlgProc = NULL; + psp.lParam = 0; + + hpsp[0] = CreatePropertySheetPageA(&psp); + + memset(&psh, 0, sizeof(psh)); + psh.dwSize = sizeof(psh); + psh.dwFlags = PSH_USECALLBACK; + psh.pszCaption = "test caption"; + psh.nPages = 1; + psh.hwndParent = parent; + U3(psh).phpage = hpsp; + psh.pfnCallback = disableowner_callback; + + PropertySheetA(&psh); + ok(IsWindowEnabled(parent) != 0, "parent window should be enabled\n"); + DestroyWindow(parent); +} + START_TEST(propsheet) { test_title(); test_nopage(); -} + test_disableowner(); +} Modified: trunk/rostests/winetests/comctl32/status.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/status…
============================================================================== --- trunk/rostests/winetests/comctl32/status.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/status.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -24,9 +24,22 @@ #include "wine/test.h" -#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got); +#define SUBCLASS_NAME "MyStatusBar" + +#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got) +#define expect_rect(_left,_top,_right,_bottom,got) do { \ + RECT exp = {abs(got.left - _left), abs(got.top - _top), \ + abs(got.right - _right), abs(got.bottom - _bottom)}; \ + ok(exp.left <= 2 && exp.top <= 2 && exp.right <= 2 && exp.bottom <= 2, \ + "Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \ + _left, _top, _right, _bottom, \ + (got).left, (got).top, (got).right, (got).bottom); } while (0) static HINSTANCE hinst; +static WNDPROC g_status_wndproc; +static RECT g_rcCreated; +static HWND g_hMainWnd; +static int g_wmsize_count = 0; static HWND create_status_control(DWORD style, DWORD exstyle) { @@ -42,6 +55,173 @@ return hWndStatus; } +static LRESULT WINAPI create_test_wndproc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + LRESULT ret; + + if (msg == WM_CREATE) + { + CREATESTRUCT *cs = (CREATESTRUCT *)lParam; + ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); + GetWindowRect(hwnd, &g_rcCreated); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&g_rcCreated, 2); + ok(cs->x == g_rcCreated.left, "CREATESTRUCT.x modified\n"); + ok(cs->y == g_rcCreated.top, "CREATESTRUCT.y modified\n"); + } else if (msg == WM_SIZE) + { + g_wmsize_count++; + ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); + } + else + ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); + + return ret; +} + +static void register_subclass() +{ + WNDCLASSEX cls; + + cls.cbSize = sizeof(WNDCLASSEX); + GetClassInfoEx(NULL, STATUSCLASSNAME, &cls); + g_status_wndproc = cls.lpfnWndProc; + cls.lpfnWndProc = create_test_wndproc; + cls.lpszClassName = SUBCLASS_NAME; + cls.hInstance = NULL; + ok(RegisterClassEx(&cls), "RegisterClassEx failed\n"); +} + +static void test_create() +{ + RECT rc; + HWND hwnd; + + ok((hwnd = CreateWindowA(SUBCLASS_NAME, "", WS_CHILD|WS_VISIBLE|SBARS_SIZEGRIP, 0, 0, 100, 100, + g_hMainWnd, NULL, NULL, 0)) != NULL, "CreateWindowA failed\n"); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); + GetWindowRect(hwnd, &rc); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); + expect_rect(0, 0, 100, 100, g_rcCreated); + expect(0, rc.left); + expect(672, rc.right); + expect(226, rc.bottom); + /* we don't check rc.top as this may depend on user font settings */ + DestroyWindow(hwnd); +} + +static int CALLBACK check_height_font_enumproc(ENUMLOGFONTEX *enumlf, NEWTEXTMETRICEX *ntm, DWORD type, LPARAM lParam) +{ + HWND hwndStatus = (HWND)lParam; + HDC hdc = GetDC(NULL); + static const int sizes[] = {8, 9, 10, 12, 16, 22, 28, 36, 48, 72}; + int i; + + trace("Font %s\n", enumlf->elfFullName); + for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++) + { + HFONT hFont; + TEXTMETRIC tm; + HFONT hCtrlFont; + HFONT hOldFont; + RECT rcCtrl; + + enumlf->elfLogFont.lfHeight = sizes[i]; + hFont = CreateFontIndirect(&enumlf->elfLogFont); + hCtrlFont = (HFONT)SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); + hOldFont = SelectObject(hdc, hFont); + + GetClientRect(hwndStatus, &rcCtrl); + GetTextMetrics(hdc, &tm); + expect(max(tm.tmHeight + (tm.tmInternalLeading ? tm.tmInternalLeading : 2) + 4, 20), rcCtrl.bottom); + + SelectObject(hdc, hOldFont); + SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hCtrlFont, TRUE); + DeleteObject(hFont); + } + ReleaseDC(NULL, hdc); + return 1; +} + +static int CALLBACK check_height_family_enumproc(ENUMLOGFONTEX *enumlf, NEWTEXTMETRICEX *ntm, DWORD type, LPARAM lParam) +{ + HDC hdc = GetDC(NULL); + enumlf->elfLogFont.lfHeight = 0; + EnumFontFamiliesEx(hdc, &enumlf->elfLogFont, (FONTENUMPROC)check_height_font_enumproc, lParam, 0); + ReleaseDC(NULL, hdc); + return 1; +} + +static void test_height(void) +{ + LOGFONT lf; + HFONT hFont, hFontSm; + RECT rc1, rc2; + HWND hwndStatus = CreateWindow(SUBCLASS_NAME, NULL, WS_CHILD|WS_VISIBLE, + 0, 0, 300, 20, g_hMainWnd, NULL, NULL, NULL); + HDC hdc; + + GetClientRect(hwndStatus, &rc1); + hFont = CreateFont(32, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, + OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, "Tahoma"); + + g_wmsize_count = 0; + SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); + if (!g_wmsize_count) + { + skip("Status control not resized in win95, skipping broken tests.\n"); + return; + } + ok(g_wmsize_count > 0, "WM_SETFONT should issue WM_SIZE\n"); + + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 42, rc2); /* GetTextMetrics returns invalid tmInternalLeading for this font */ + + g_wmsize_count = 0; + SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); + ok(g_wmsize_count > 0, "WM_SETFONT should issue WM_SIZE\n"); + + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 42, rc2); + + /* minheight < fontsize - no effects*/ + SendMessage(hwndStatus, SB_SETMINHEIGHT, 12, 0); + SendMessage(hwndStatus, WM_SIZE, 0, 0); + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 42, rc2); + + /* minheight > fontsize - has an effect after WM_SIZE */ + SendMessage(hwndStatus, SB_SETMINHEIGHT, 60, 0); + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 42, rc2); + SendMessage(hwndStatus, WM_SIZE, 0, 0); + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 62, rc2); + + /* font changed to smaller than minheight - has an effect */ + SendMessage(hwndStatus, SB_SETMINHEIGHT, 30, 0); + expect_rect(0, 0, 672, 62, rc2); + SendMessage(hwndStatus, WM_SIZE, 0, 0); + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 42, rc2); + hFontSm = CreateFont(9, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, + OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, "Tahoma"); + SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFontSm, TRUE); + GetClientRect(hwndStatus, &rc2); + expect_rect(0, 0, 672, 32, rc2); + + /* test the height formula */ + ZeroMemory(&lf, sizeof(lf)); + SendMessage(hwndStatus, SB_SETMINHEIGHT, 0, 0); + hdc = GetDC(NULL); + trace("dpi=%d\n", GetDeviceCaps(hdc, LOGPIXELSY)); + EnumFontFamiliesEx(hdc, &lf, (FONTENUMPROC)check_height_family_enumproc, (LPARAM)hwndStatus, 0); + ReleaseDC(NULL, hdc); + + DestroyWindow(hwndStatus); + DeleteObject(hFont); + DeleteObject(hFontSm); +} + static void test_status_control(void) { HWND hWndStatus; @@ -56,7 +236,7 @@ hWndStatus = create_status_control(WS_VISIBLE, 0); /* Divide into parts and set text */ - r = SendMessage(hWndStatus, SB_SETPARTS, 3, (long)nParts); + r = SendMessage(hWndStatus, SB_SETPARTS, 3, (LPARAM)nParts); expect(TRUE,r); r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)"First"); expect(TRUE,r); @@ -87,12 +267,12 @@ expect(0,HIWORD(r)); /* Get parts and borders */ - r = SendMessage(hWndStatus, SB_GETPARTS, 3, (long)checkParts); + r = SendMessage(hWndStatus, SB_GETPARTS, 3, (LPARAM)checkParts); ok(r == 3, "Expected 3, got %d\n", r); expect(50,checkParts[0]); expect(150,checkParts[1]); expect(-1,checkParts[2]); - r = SendMessage(hWndStatus, SB_GETBORDERS, 0, (long)borders); + r = SendMessage(hWndStatus, SB_GETBORDERS, 0, (LPARAM)borders); ok(r == TRUE, "Expected TRUE, got %d\n", r); expect(0,borders[0]); expect(2,borders[1]); @@ -128,18 +308,28 @@ /* Set background color */ r = SendMessage(hWndStatus, SB_SETBKCOLOR , 0, RGB(255,0,0)); - expect(CLR_DEFAULT,r); + ok(r == CLR_DEFAULT || + broken(r == 0), /* win95 */ + "Expected %d, got %d\n", CLR_DEFAULT, r); r = SendMessage(hWndStatus, SB_SETBKCOLOR , 0, CLR_DEFAULT); - expect(RGB(255,0,0),r); + ok(r == RGB(255,0,0) || + broken(r == 0), /* win95 */ + "Expected %d, got %d\n", RGB(255,0,0), r); /* Add an icon to the status bar */ hIcon = LoadIcon(NULL, IDI_QUESTION); - r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) NULL); - ok(r != 0, "Expected non-zero, got %d\n", r); + r = SendMessage(hWndStatus, SB_SETICON, 1, 0); + ok(r != 0 || + broken(r == 0), /* win95 */ + "Expected non-zero, got %d\n", r); r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) hIcon); - ok(r != 0, "Expected non-zero, got %d\n", r); - r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) NULL); - ok(r != 0, "Expected non-zero, got %d\n", r); + ok(r != 0 || + broken(r == 0), /* win95 */ + "Expected non-zero, got %d\n", r); + r = SendMessage(hWndStatus, SB_SETICON, 1, 0); + ok(r != 0 || + broken(r == 0), /* win95 */ + "Expected non-zero, got %d\n", r); /* Set the Unicode format */ r = SendMessage(hWndStatus, SB_SETUNICODEFORMAT, FALSE, 0); @@ -148,15 +338,17 @@ r = SendMessage(hWndStatus, SB_SETUNICODEFORMAT, TRUE, 0); expect(FALSE,r); r = SendMessage(hWndStatus, SB_GETUNICODEFORMAT, 0, 0); - expect(TRUE,r); + ok(r == TRUE || + broken(r == FALSE), /* win95 */ + "Expected TRUE, got %d\n", r); /* Reset number of parts */ - r = SendMessage(hWndStatus, SB_SETPARTS, 2, (long)nParts); + r = SendMessage(hWndStatus, SB_SETPARTS, 2, (LPARAM)nParts); expect(TRUE,r); /* Set the minimum height and get rectangle information again */ - SendMessage(hWndStatus, SB_SETMINHEIGHT, 50, (LPARAM) 0); - r = SendMessage(hWndStatus, WM_SIZE, 0, (LPARAM) 0); + SendMessage(hWndStatus, SB_SETMINHEIGHT, 50, 0); + r = SendMessage(hWndStatus, WM_SIZE, 0, 0); expect(0,r); r = SendMessage(hWndStatus, SB_GETRECT, 0, (LPARAM)&rc); expect(TRUE,r); @@ -174,14 +366,19 @@ todo_wine { SendMessage(hWndStatus, SB_SETTIPTEXT, 0,(LPARAM) "Tooltip Text"); + lstrcpyA(charArray, "apple"); SendMessage(hWndStatus, SB_GETTIPTEXT, MAKEWPARAM (0, 20),(LPARAM) charArray); - ok(strcmp(charArray,"Tooltip Text") == 0, "Expected Tooltip Text, got %s\n", charArray); + ok(strcmp(charArray,"Tooltip Text") == 0 || + broken(!strcmp(charArray, "apple")), /* win95 */ + "Expected Tooltip Text, got %s\n", charArray); } /* Make simple */ SendMessage(hWndStatus, SB_SIMPLE, TRUE, 0); r = SendMessage(hWndStatus, SB_ISSIMPLE, 0, 0); - expect(TRUE,r); + ok(r == TRUE || + broken(r == FALSE), /* win95 */ + "Expected TRUE, got %d\n", r); DestroyWindow(hWndStatus); } @@ -190,7 +387,16 @@ { hinst = GetModuleHandleA(NULL); + g_hMainWnd = CreateWindowExA(0, "static", "", WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), + 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), + NULL, NULL, GetModuleHandleA(NULL), 0); + InitCommonControls(); + register_subclass(); + test_status_control(); -} + test_create(); + test_height(); +} Modified: trunk/rostests/winetests/comctl32/subclass.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/subcla…
============================================================================== --- trunk/rostests/winetests/comctl32/subclass.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/subclass.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -17,10 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define _WIN32_WINNT 0x0501 /* For SetWindowSubclass/etc */ + #include <assert.h> #include <stdarg.h> - -#define _WIN32_WINNT 0x0501 /* For SetWindowSubclass/etc */ #include "windef.h" #include "winbase.h" @@ -234,7 +234,7 @@ ok_sequence(Sub_AfterDeletedTest, "After Deleted"); pSetWindowSubclass(hwnd, WndProcSub, 2, 0); - origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG)WndProc3); + origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc3); SendMessage(hwnd, WM_USER, 1, 0); SendMessage(hwnd, WM_USER, 2, 0); ok_sequence(Sub_OldAfterNewTest, "Old after New"); Modified: trunk/rostests/winetests/comctl32/tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/tab.c?…
============================================================================== --- trunk/rostests/winetests/comctl32/tab.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/tab.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -27,7 +27,6 @@ #include "msg.h" #define DEFAULT_MIN_TAB_WIDTH 54 -#define TAB_DEFAULT_WIDTH 96 #define TAB_PADDING_X 6 #define EXTRA_ICON_PADDING 3 #define MAX_TABLEN 32 @@ -92,7 +91,7 @@ { TCM_INSERTITEMA, sent }, { TCM_INSERTITEMA, sent }, { WM_NOTIFYFORMAT, sent|defwinproc }, - { WM_QUERYUISTATE, sent|wparam|lparam|defwinproc, 0, 0 }, + { WM_QUERYUISTATE, sent|wparam|lparam|defwinproc|optional, 0, 0 }, { WM_PARENTNOTIFY, sent|defwinproc }, { TCM_INSERTITEMA, sent }, { TCM_INSERTITEMA, sent }, @@ -125,7 +124,7 @@ static const struct message add_tab_control_parent_seq[] = { { WM_NOTIFYFORMAT, sent }, - { WM_QUERYUISTATE, sent|wparam|lparam, 0, 0 }, + { WM_QUERYUISTATE, sent|wparam|lparam|optional, 0, 0 }, { 0 } }; @@ -217,10 +216,10 @@ }; static const struct message getset_tooltip_seq[] = { - { WM_NOTIFYFORMAT, sent }, - { WM_QUERYUISTATE, sent|wparam|lparam, 0, 0 }, + { WM_NOTIFYFORMAT, sent|optional }, + { WM_QUERYUISTATE, sent|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_NOTIFYFORMAT, sent }, + { WM_NOTIFYFORMAT, sent|optional }, { TCM_SETTOOLTIPS, sent|lparam, 0 }, { TCM_GETTOOLTIPS, sent|wparam|lparam, 0, 0 }, { TCM_SETTOOLTIPS, sent|lparam, 0 }, @@ -241,7 +240,7 @@ { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_INSERTITEM, sent|wparam, 2 }, { WM_NOTIFYFORMAT, sent|defwinproc, }, - { WM_QUERYUISTATE, sent|defwinproc, }, + { WM_QUERYUISTATE, sent|defwinproc|optional, }, { WM_PARENTNOTIFY, sent|defwinproc, }, { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, @@ -351,7 +350,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Tab test parent class"; @@ -506,12 +505,16 @@ SIZE size; HDC hdc; HFONT hOldFont; - INT i; + INT i, dpi; hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); + /* Get System default MinTabWidth */ + if (nMinTabWidth < 0) + nMinTabWidth = SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); hOldFont = SelectObject(hdc, (HFONT)SendMessage(hwTab, WM_GETFONT, 0, 0)); GetTextExtentPoint32A(hdc, "Tab 1", strlen("Tab 1"), &size); trace("Tab1 text size: size.cx=%d size.cy=%d\n", size.cx, size.cy); @@ -519,7 +522,7 @@ ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH tabs no icon...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "default width"); + CheckSize(hwTab, dpi, -1, "default width"); TabCheckSetSize(hwTab, 50, 20, 50, 20, "set size"); TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); @@ -535,8 +538,11 @@ hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BUTTONS, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); + hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH buttons no icon...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "default width"); + CheckSize(hwTab, dpi, -1, "default width"); TabCheckSetSize(hwTab, 20, 20, 20, 20, "set size 1"); TabCheckSetSize(hwTab, 10, 50, 10, 50, "set size 2"); TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); @@ -555,8 +561,11 @@ hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BOTTOM, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); + hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH | TCS_BOTTOM tabs...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "no icon, default width"); + CheckSize(hwTab, dpi, -1, "no icon, default width"); TabCheckSetSize(hwTab, 20, 20, 20, 20, "no icon, set size 1"); TabCheckSetSize(hwTab, 10, 50, 10, 50, "no icon, set size 2"); @@ -633,6 +642,8 @@ RECT rTab; INT nTabsRetrieved; INT rowCount; + INT dpi; + HDC hdc; ok(parent_wnd != NULL, "no parent window!\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -655,10 +666,7 @@ "Parent after sequence, adding tab control to parent", TRUE); flush_sequences(sequences, NUM_MSG_SEQUENCES); - todo_wine{ - expect(DEFAULT_MIN_TAB_WIDTH, (int)SendMessage(hTab, TCM_SETMINTABWIDTH, 0, -1)); - } - ok_sequence(sequences, TAB_SEQ_INDEX, set_min_tab_width_seq, "Set minTabWidth test sequence", FALSE); + ok(SendMessage(hTab, TCM_SETMINTABWIDTH, 0, -1) > 0,"TCM_SETMINTABWIDTH returned < 0\n"); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Set minTabWidth test parent sequence", FALSE); /* Testing GetItemCount */ @@ -678,7 +686,11 @@ /* Testing GetItemRect */ flush_sequences(sequences, NUM_MSG_SEQUENCES); ok(SendMessage(hTab, TCM_GETITEMRECT, 0, (LPARAM) &rTab), "GetItemRect failed.\n"); - CheckSize(hTab, TAB_DEFAULT_WIDTH, -1 , "Default Width"); + + hdc = GetDC(hTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hTab, hdc); + CheckSize(hTab, dpi, -1 , "Default Width"); ok_sequence(sequences, TAB_SEQ_INDEX, get_item_rect_seq, "Get itemRect test sequence", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Get itemRect test parent sequence", FALSE); @@ -834,7 +846,7 @@ SendMessage(hTab, TCM_SETTOOLTIPS, (LPARAM) toolTip, 0); ok (toolTip == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n"); - SendMessage(hTab, TCM_SETTOOLTIPS, (LPARAM) NULL, 0); + SendMessage(hTab, TCM_SETTOOLTIPS, 0, 0); ok (NULL == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n"); ok_sequence(sequences, TAB_SEQ_INDEX, getset_tooltip_seq, "Getset tooltip test sequence", TRUE); @@ -844,6 +856,22 @@ DestroyWindow(hTab); } +static void test_adjustrect(HWND parent_wnd) +{ + HWND hTab; + INT r; + + ok(parent_wnd != NULL, "no parent window!\n"); + + hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, 0, 0); + ok(hTab != NULL, "Failed to create tab control\n"); + + r = SendMessage(hTab, TCM_ADJUSTRECT, FALSE, 0); + expect(-1, r); + + r = SendMessage(hTab, TCM_ADJUSTRECT, TRUE, 0); + expect(-1, r); +} static void test_insert_focus(HWND parent_wnd) { HWND hTab; @@ -989,6 +1017,8 @@ /* Testing getters and setters with 5 tabs */ test_getters_setters(parent_wnd, 5); + test_adjustrect(parent_wnd); + test_insert_focus(parent_wnd); test_delete_focus(parent_wnd); Modified: trunk/rostests/winetests/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/toolba…
============================================================================== --- trunk/rostests/winetests/comctl32/toolbar.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/toolbar.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -1,4 +1,4 @@ -/* Unit tests for treeview. +/* Unit tests for toolbar. * * Copyright 2005 Krzysztof Foltman * Copyright 2007 Mikolaj Zalewski @@ -114,7 +114,7 @@ WS_VISIBLE | WS_CLIPCHILDREN | CCS_TOP | WS_CHILD | TBSTYLE_LIST, 100, - 0, NULL, (UINT)0, + 0, NULL, 0, buttons, sizeof(buttons)/sizeof(buttons[0]), 0, 0, 20, 16, sizeof(TBBUTTON)); ok(hToolbar != NULL, "Toolbar creation\n"); @@ -168,7 +168,7 @@ *hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hMainWnd, (HMENU)5, GetModuleHandle(NULL), NULL); ok(*hToolbar != NULL, "Toolbar creation problem\n"); - ok(SendMessage(*hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0) == 0, "TB_BUTTONSTRUCTSIZE failed\n"); + ok(SendMessage(*hToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0) == 0, "TB_BUTTONSTRUCTSIZE failed\n"); ok(SendMessage(*hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n"); ok(SendMessage(*hToolbar, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0)==1, "WM_SETFONT\n"); } @@ -203,6 +203,13 @@ ok(SendMessage(*hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n"); } +static void add_128x15_bitmap(HWND hToolbar, int nCmds) +{ + TBADDBITMAP bmp128; + bmp128.hInst = GetModuleHandle(NULL); + bmp128.nID = IDB_BITMAP_128x15; + ok(SendMessageA(hToolbar, TB_ADDBITMAP, nCmds, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); +} #define CHECK_IMAGELIST(count, dx, dy) { \ int cx, cy; \ @@ -710,6 +717,18 @@ { {0, 0, 672, 28}, {978, 38}, 6, { { 0, 0, 163, 38}, {163, 0, 326, 38}, {326, 0, 489, 38}, {489, 0, 652, 38}, {652, 0, 819, 38}, {819, 0, 850, 38}, + }, }, + { {0, 0, 672, 100}, {239, 102}, 3, { + { 0, 2, 100, 102}, {100, 2, 139, 102}, {139, 2, 239, 102}, + }, }, + { {0, 0, 672, 42}, {185, 40}, 3, { + { 0, 2, 75, 40}, {75, 2, 118, 40}, {118, 2, 185, 40}, + }, }, + { {0, 0, 672, 42}, {67, 40}, 1, { + { 0, 2, 67, 40}, + }, }, + { {0, 0, 672, 42}, {67, 41}, 2, { + { 0, 2, 672, 41}, { 0, 41, 672, 80}, }, }, }; @@ -759,6 +778,7 @@ { HWND hToolbar = NULL; HIMAGELIST himl; + TBBUTTONINFO tbinfo; int style; int i; @@ -854,6 +874,18 @@ ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(16, 15)); ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 21), "Unexpected button size\n"); + /* -1 in TB_SETBITMAPSIZE is a special code meaning that the coordinate shouldn't be changed */ + add_128x15_bitmap(hToolbar, 16); + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(14, -1)), "TB_SETBITMAPSIZE failed\n"); + compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 21), "%x"); + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, 12)), "TB_SETBITMAPSIZE failed\n"); + compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, -1)), "TB_SETBITMAPSIZE failed\n"); + compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); + /* check the imagelist */ + InvalidateRect(hToolbar, NULL, TRUE); + UpdateWindow(hToolbar); + CHECK_IMAGELIST(16, 14, 12); rebuild_toolbar(&hToolbar); SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"A\0MMMMMMMMMMMMM\0"); @@ -924,6 +956,46 @@ SendMessageA(hToolbar, TB_DELETEBUTTON, 0, 0); ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 39), "Unexpected button size\n"); + rebuild_toolbar(&hToolbar); + + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons2[0]) == 1, "TB_ADDBUTTONS failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[2]) == 1, "TB_ADDBUTTONS failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[0]) == 1, "TB_ADDBUTTONS failed\n"); + SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); + check_sizes(); + + rebuild_toolbar(&hToolbar); + SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_LIST | GetWindowLong(hToolbar, GWL_STYLE)); + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons2[0]) == 1, "TB_ADDBUTTONS failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[2]) == 1, "TB_ADDBUTTONS failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); + SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); + check_sizes_todo(0xff); + + rebuild_toolbar(&hToolbar); + SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_LIST | GetWindowLong(hToolbar, GWL_STYLE)); + ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); + SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); + check_sizes(); + + rebuild_toolbar(&hToolbar); + SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_WRAPABLE | GetWindowLong(hToolbar, GWL_STYLE)); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); + ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); + tbinfo.cx = 672; + tbinfo.cbSize = sizeof(TBBUTTONINFO); + tbinfo.dwMask = TBIF_SIZE | TBIF_BYINDEX; + ok(SendMessageA(hToolbar, TB_SETBUTTONINFO, 0, (LPARAM)&tbinfo) != 0, "TB_SETBUTTONINFO failed\n"); + ok(SendMessageA(hToolbar, TB_SETBUTTONINFO, 1, (LPARAM)&tbinfo) != 0, "TB_SETBUTTONINFO failed\n"); + SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); + check_sizes(); + DestroyWindow(hToolbar); } @@ -1065,7 +1137,7 @@ WS_VISIBLE | WS_CLIPCHILDREN | WS_CHILD | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NOMOVEY | CCS_TOP, 0, - 0, NULL, (UINT)0, + 0, NULL, 0, buttons, sizeof(buttons)/sizeof(buttons[0]), 20, 20, 0, 0, sizeof(TBBUTTON)); ok(hToolbar != NULL, "Toolbar creation\n"); @@ -1079,7 +1151,7 @@ memset(&rc, 0xCC, sizeof(rc)); SendMessageA(hToolbar, TB_SETROWS, MAKELONG(tbrows_results[i].nRows, tbrows_results[i].bLarger), - (LONG) &rc); + (LPARAM) &rc); rows = SendMessageA(hToolbar, TB_GETROWS, MAKELONG(0,0), MAKELONG(0,0)); ok(rows == tbrows_results[i].expectedRows, @@ -1102,15 +1174,15 @@ hToolbar = CreateWindowExA(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hMainWnd, (HMENU)5, GetModuleHandle(NULL), NULL); ok(hToolbar != NULL, "Toolbar creation problem\n"); - r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), (LPARAM)NULL); + r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), 0); expect(-1, r); - r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), (LPARAM)NULL); + r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), 0); expect(-1, r); r = SendMessage(hToolbar, TB_ADDSTRING, 0, (LPARAM)answer); expect(0, r); - r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), (LPARAM)NULL); + r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(0, 0), 0); expect(lstrlenA(answer), r); - r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), (LPARAM)NULL); + r = SendMessage(hToolbar, TB_GETSTRINGW, MAKEWPARAM(0, 0), 0); expect(lstrlenA(answer), r); r = SendMessage(hToolbar, TB_GETSTRING, MAKEWPARAM(sizeof(str), 0), (LPARAM)str); expect(lstrlenA(answer), r); Modified: trunk/rostests/winetests/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/toolti…
============================================================================== --- trunk/rostests/winetests/comctl32/tooltips.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/tooltips.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -101,8 +101,8 @@ case WM_NOTIFY: if (((NMHDR *)lParam)->code == NM_CUSTOMDRAW) { NMTTCUSTOMDRAW *ttcd = (NMTTCUSTOMDRAW*) lParam; - ok(ttcd->nmcd.hdr.hwndFrom == g_hwnd, "Unexpected hwnd source %x (%x)\n", - (int)ttcd->nmcd.hdr.hwndFrom, (int) g_hwnd); + ok(ttcd->nmcd.hdr.hwndFrom == g_hwnd, "Unexpected hwnd source %p (%p)\n", + ttcd->nmcd.hdr.hwndFrom, g_hwnd); ok(ttcd->nmcd.hdr.idFrom == 0x1234ABCD, "Unexpected id %x\n", (int)ttcd->nmcd.hdr.idFrom); switch (ttcd->nmcd.dwDrawStage) { @@ -205,7 +205,7 @@ toolInfo.hwnd = parent; toolInfo.hinst = GetModuleHandleA(NULL); toolInfo.uFlags = TTF_SUBCLASS; - toolInfo.uId = (UINT_PTR)0x1234ABCD; + toolInfo.uId = 0x1234ABCD; toolInfo.lpszText = (LPSTR)"This is a test tooltip"; toolInfo.lParam = 0xdeadbeef; GetClientRect (parent, &toolInfo.rect); @@ -213,7 +213,7 @@ ok(lResult, "Adding the tool to the tooltip failed\n"); /* Make tooltip appear quickly */ - SendMessage(hwndTip, TTM_SETDELAYTIME, (WPARAM)TTDT_INITIAL, (LPARAM)MAKELONG(1,0)); + SendMessage(hwndTip, TTM_SETDELAYTIME, TTDT_INITIAL, MAKELPARAM(1,0)); /* Put cursor inside window, tooltip will appear immediately */ SetCursorPos(100, 100); @@ -232,10 +232,79 @@ } +static void test_gettext(void) +{ + HWND hwnd; + TTTOOLINFOA toolinfoA; + TTTOOLINFOW toolinfoW; + LRESULT r; + char bufA[10] = ""; + WCHAR bufW[10] = { 0 }; + + /* For bug 14790 - lpszText is NULL */ + hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, + 10, 10, 300, 100, + NULL, NULL, NULL, 0); + assert(hwnd); + + toolinfoA.cbSize = sizeof(TTTOOLINFOA); + toolinfoA.hwnd = NULL; + toolinfoA.hinst = GetModuleHandleA(NULL); + toolinfoA.uFlags = 0; + toolinfoA.uId = 0x1234ABCD; + toolinfoA.lpszText = NULL; + toolinfoA.lParam = 0xdeadbeef; + GetClientRect(hwnd, &toolinfoA.rect); + r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); + ok(r, "Adding the tool to the tooltip failed\n"); + if (r) + { + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1234ABCD; + toolinfoA.lpszText = bufA; + SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n"); + } + + DestroyWindow(hwnd); + + SetLastError(0xdeadbeef); + hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, + 10, 10, 300, 100, + NULL, NULL, NULL, 0); + + if (!hwnd && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { + win_skip("CreateWindowExW is not implemented\n"); + return; + } + + assert(hwnd); + + toolinfoW.cbSize = sizeof(TTTOOLINFOW); + toolinfoW.hwnd = NULL; + toolinfoW.hinst = GetModuleHandleA(NULL); + toolinfoW.uFlags = 0; + toolinfoW.uId = 0x1234ABCD; + toolinfoW.lpszText = NULL; + toolinfoW.lParam = 0xdeadbeef; + GetClientRect(hwnd, &toolinfoW.rect); + r = SendMessageW(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoW); + ok(r, "Adding the tool to the tooltip failed\n"); + + toolinfoW.hwnd = NULL; + toolinfoW.uId = 0x1234ABCD; + toolinfoW.lpszText = bufW; + SendMessageW(hwnd, TTM_GETTEXTW, 0, (LPARAM)&toolinfoW); + ok(toolinfoW.lpszText[0] == 0, "lpszText should be an empty string\n"); + + DestroyWindow(hwnd); +} + START_TEST(tooltips) { InitCommonControls(); test_create_tooltip(); test_customdraw(); -} + test_gettext(); +} Modified: trunk/rostests/winetests/comctl32/trackbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/trackb…
============================================================================== --- trunk/rostests/winetests/comctl32/trackbar.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/trackbar.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -40,6 +40,7 @@ { WM_CREATE, sent }, { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, + { WM_QUERYNEWPALETTE, sent|optional }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 }, @@ -65,7 +66,7 @@ static const struct message parent_create_trackbar_wnd_seq[] = { { WM_NOTIFYFORMAT, sent}, - { 0x0129, sent}, /* should be WM_QUERYUISTATE instead of 0x0129 */ + { WM_QUERYUISTATE, sent|optional}, { WM_WINDOWPOSCHANGING, sent}, { WM_NCACTIVATE, sent}, { PBT_APMRESUMECRITICAL, sent}, @@ -79,6 +80,7 @@ }; static const struct message parent_new_window_test_seq[] = { + { WM_QUERYNEWPALETTE, sent|optional }, { WM_WINDOWPOSCHANGING, sent}, { WM_NCACTIVATE, sent}, { PBT_APMRESUMECRITICAL, sent}, @@ -86,7 +88,7 @@ { WM_IME_NOTIFY, sent|defwinproc|optional}, { WM_SETFOCUS, sent|defwinproc}, { WM_NOTIFYFORMAT, sent}, - { 0x0129, sent}, /* should be WM_QUERYUISTATE instead of 0x0129*/ + { WM_QUERYUISTATE, sent|optional}, {0} }; @@ -139,11 +141,13 @@ { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, { WM_PAINT, sent|defwinproc}, { TBM_GETPOS, sent}, + { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, { TBM_SETPOS, sent|wparam|lparam, TRUE, 1000}, { WM_PAINT, sent|defwinproc}, { TBM_GETPOS, sent}, { TBM_SETPOS, sent|wparam|lparam, FALSE, 20}, { TBM_GETPOS, sent}, + { TBM_SETPOS, sent|wparam|lparam, TRUE, 20}, { TBM_GETPOS, sent}, {0} }; @@ -331,10 +335,10 @@ static const struct message tic_placement_test_seq[] = { { TBM_GETPTICS, sent}, { TBM_GETTIC, sent|wparam, 0}, + { TBM_GETTIC, sent|wparam, 2}, { TBM_GETTIC, sent|wparam, 4}, - { TBM_GETTIC, sent|wparam, 11}, { TBM_GETTICPOS, sent|wparam, 0}, - { TBM_GETTICPOS, sent|wparam, 4}, + { TBM_GETTICPOS, sent|wparam, 2}, {0} }; @@ -392,8 +396,9 @@ LRESULT ret; struct message msg; - /* do not log painting messages */ - if (message != WM_PAINT && + /* log system messages, except for painting */ + if (message < WM_USER && + message != WM_PAINT && message != WM_ERASEBKGND && message != WM_NCPAINT && message != WM_NCHITTEST && @@ -401,6 +406,8 @@ message != WM_GETICON && message != WM_DEVICECHANGE) { + trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -425,7 +432,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Trackbar test parent class"; @@ -449,6 +456,8 @@ static long defwndproc_counter = 0; LRESULT ret; struct message msg; + + trace("trackbar: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); msg.message = message; msg.flags = sent|wparam|lparam; @@ -598,12 +607,14 @@ SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(5, r); + SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 1000); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(100, r); SendMessage(hWndTrackbar, TBM_SETPOS, FALSE, 20); r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); expect(20, r); + SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 20); /* test TBM_GETPOS */ r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); @@ -799,34 +810,37 @@ static void test_tic_placement(HWND hWndTrackbar){ int r; DWORD *rPTics; + DWORD numtics; + + SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(1, 6)); + SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0); + + numtics = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); + ok(numtics == 6, "Expected 6, got %d\n", numtics); flush_sequences(sequences, NUM_MSG_SEQUENCE); /* test TBM_GETPTICS */ rPTics = (DWORD *) SendMessage(hWndTrackbar, TBM_GETPTICS, 0,0); - todo_wine{ - expect(1, rPTics[0]); - expect(2, rPTics[1]); - expect(3, rPTics[2]); - expect(4, rPTics[3]); - } + expect(2, rPTics[0]); + expect(3, rPTics[1]); + expect(4, rPTics[2]); + expect(5, rPTics[3]); /* test TBM_GETTIC */ r = SendMessage(hWndTrackbar, TBM_GETTIC, 0,0); + expect(2, r); + r = SendMessage(hWndTrackbar, TBM_GETTIC, 2,0); + expect(4, r); + r = SendMessage(hWndTrackbar, TBM_GETTIC, 4,0); todo_wine{ - expect(1, r); - r = SendMessage(hWndTrackbar, TBM_GETTIC, 4,0); - expect(5, r); + expect(-1, r); } - r = SendMessage(hWndTrackbar, TBM_GETTIC, 11,0); - expect(-1, r); /* test TBM_GETTICPIC */ r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 0, 0); - todo_wine{ - ok(r > 0, "Expected r > 0, got %d\n", r); - r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 4, 0); - ok(r > 0, "Expected r > 0, got %d\n", r); - } + ok(r > 0, "Expected r > 0, got %d\n", r); + r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 2, 0); + ok(r > 0, "Expected r > 0, got %d\n", r); ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_placement_test_seq, "get tic placement test sequence", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent get tic placement test sequence", FALSE); @@ -861,7 +875,7 @@ SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 0); rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); ok(rTest == hWndTooltip, "Expected hWndToolTip, got\n"); - SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) NULL, 0); + SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, 0, 0); rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); ok(rTest == NULL, "Expected NULL\n"); SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 5); Modified: trunk/rostests/winetests/comctl32/treeview.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/treevi…
============================================================================== --- trunk/rostests/winetests/comctl32/treeview.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/treeview.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -64,6 +64,13 @@ { 0 } }; +static const struct message DoTest3Seq[] = { + { TVM_INSERTITEM, sent }, + { TVM_GETITEM, sent }, + { TVM_DELETEITEM, sent }, + { 0 } +}; + static const struct message DoFocusTestSeq[] = { { TVM_INSERTITEM, sent }, { TVM_INSERTITEM, sent }, @@ -75,10 +82,10 @@ { WM_NCCALCSIZE, sent|wparam, 0x00000001 }, { WM_WINDOWPOSCHANGED, sent }, { WM_SIZE, sent|defwinproc }, - { WM_WINDOWPOSCHANGING, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 0x00000001 }, - { WM_WINDOWPOSCHANGED, sent|defwinproc }, - { WM_SIZE, sent|defwinproc }, + { WM_WINDOWPOSCHANGING, sent|defwinproc|optional }, + { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 0x00000001 }, + { WM_WINDOWPOSCHANGED, sent|defwinproc|optional }, + { WM_SIZE, sent|defwinproc|optional }, { TVM_SELECTITEM, sent|wparam, 0x00000009 }, /* The following end up out of order in wine */ { WM_PAINT, sent|defwinproc }, @@ -104,7 +111,7 @@ { TVM_GETBKCOLOR, sent|wparam|lparam, 0x00000000, 0x00000000 }, { TVM_SETBKCOLOR, sent|wparam|lparam, 0x00000000, 0x00ffffff }, { TVM_GETBKCOLOR, sent|wparam|lparam, 0x00000000, 0x00000000 }, - { TVM_SETBKCOLOR, sent|wparam|lparam, 0x00000000, 0xffffffff }, + { TVM_SETBKCOLOR, sent|wparam|lparam, 0x00000000, -1 }, { 0 } }; @@ -139,11 +146,11 @@ static const struct message TestGetSetItemHeightSeq[] = { { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0x00000000, 0x00000000 }, - { TVM_SETITEMHEIGHT, sent|wparam|lparam, 0xffffffff, 0x00000000 }, + { TVM_SETITEMHEIGHT, sent|wparam|lparam, -1, 0x00000000 }, { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0x00000000, 0x00000000 }, { TVM_SETITEMHEIGHT, sent|lparam, 0xcccccccc, 0x00000000 }, - { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0x00000000, 0x00000000 }, - { TVM_SETITEMHEIGHT, sent|wparam|lparam, 0x00000009, 0x00000000 }, + { TVM_GETITEMHEIGHT, sent|wparam|lparam|optional, 0x00000000, 0x00000000 }, + { TVM_SETITEMHEIGHT, sent|wparam|lparam|optional, 0x00000009, 0x00000000 }, { WM_WINDOWPOSCHANGING, sent|defwinproc }, { WM_NCCALCSIZE, sent|wparam|defwinproc, 0x00000001 }, { WM_WINDOWPOSCHANGED, sent|defwinproc }, @@ -164,7 +171,7 @@ { TVM_GETTEXTCOLOR, sent|wparam|lparam, 0x00000000, 0x00000000 }, { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0x00000000, 0x00ffffff }, { TVM_GETTEXTCOLOR, sent|wparam|lparam, 0x00000000, 0x00000000 }, - { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0x00000000, 0xffffffff }, + { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0x00000000, -1 }, { 0 } }; @@ -293,6 +300,35 @@ r = TreeView_SelectItem(hTree, hRoot); AddItem('.'); ok(!strcmp(sequence, "1(nR)nR23(RC)RC45(CR)CR."), "root-child select test\n"); +} + +static void DoTest3(void) +{ + TVINSERTSTRUCTA ins; + HTREEITEM hChild; + TVITEM tvi; + + int nBufferSize = 80; + CHAR szBuffer[80] = "Blah"; + + /* add an item without TVIF_TEXT mask and pszText == NULL */ + ins.hParent = hRoot; + ins.hInsertAfter = TVI_ROOT; + U(ins).item.mask = 0; + U(ins).item.pszText = NULL; + U(ins).item.cchTextMax = 0; + hChild = TreeView_InsertItem(hTree, &ins); + assert(hChild); + + /* retrieve it with TVIF_TEXT mask */ + tvi.hItem = hChild; + tvi.mask = TVIF_TEXT; + tvi.cchTextMax = nBufferSize; + tvi.pszText = szBuffer; + + SendMessageA( hTree, TVM_GETITEM, 0, (LPARAM)&tvi ); + ok(!strcmp(szBuffer, ""), "szBuffer=\"%s\", expected \"\"\n", szBuffer); + ok(SendMessageA(hTree, TVM_DELETEITEM, 0, (LPARAM)hChild), "DeleteItem failed\n"); } static void DoFocusTest(void) @@ -700,6 +736,10 @@ ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoTest2Seq, "DoTest2", FALSE); flush_sequences(MsgSequences, NUM_MSG_SEQUENCES); + DoTest3(); + ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoTest3Seq, "DoTest3", FALSE); + + flush_sequences(MsgSequences, NUM_MSG_SEQUENCES); DoFocusTest(); ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoFocusTestSeq, "DoFocusTest", TRUE); Modified: trunk/rostests/winetests/comctl32/updown.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/updown…
============================================================================== --- trunk/rostests/winetests/comctl32/updown.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/updown.c [iso-8859-1] Sat Jan 17 11:42:01 2009 @@ -70,6 +70,7 @@ { WM_CREATE, sent }, { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, + { WM_QUERYNEWPALETTE, sent|optional }, { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, { WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_NCACTIVATE, sent|wparam, 1 }, @@ -100,7 +101,7 @@ static const struct message add_updown_to_parent_seq[] = { { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent }, + { WM_QUERYUISTATE, sent|optional }, { WM_PARENTNOTIFY, sent|wparam, MAKELONG(WM_CREATE, WM_CREATE) }, { 0 } }; @@ -196,8 +197,9 @@ LRESULT ret; struct message msg; - /* do not log painting messages */ - if (message != WM_PAINT && + /* log system messages, except for painting */ + if (message < WM_USER && + message != WM_PAINT && message != WM_ERASEBKGND && message != WM_NCPAINT && message != WM_NCHITTEST && @@ -232,7 +234,7 @@ cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(NULL); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "Up-Down test parent class";
15 years, 11 months
1
0
0
0
[hyperion] 38828: modified dll/win32/kernel32/debug/output.c KJK::Hyperion vs KJK::Hyperion: finishing the job I started in 2003 "please uncomment when GCC supports SEH": it kind of does now, but it's totally unnecessary in K32CreateDBMonMutex "FIXME: this will be pointless until GCC does SEH": no longer pointless, I guess. 6 years after the fact, OutputDebugStringA finally sends the string to the user-mode debugger. Now if only we could test it... Use DBG_PRINTEXCEPTION_C symbolic constant inst
by hyperion@svn.reactos.org
Author: hyperion Date: Sat Jan 17 11:40:42 2009 New Revision: 38828 URL:
http://svn.reactos.org/svn/reactos?rev=38828&view=rev
Log: modified dll/win32/kernel32/debug/output.c KJK::Hyperion vs KJK::Hyperion: finishing the job I started in 2003 "please uncomment when GCC supports SEH": it kind of does now, but it's totally unnecessary in K32CreateDBMonMutex "FIXME: this will be pointless until GCC does SEH": no longer pointless, I guess. 6 years after the fact, OutputDebugStringA finally sends the string to the user-mode debugger. Now if only we could test it... Use DBG_PRINTEXCEPTION_C symbolic constant instead of hardcoding its value Some [FORMATTING] Make K32CreateDBMonMutex, for symbol table hygiene My e-mail address changed Modified: trunk/reactos/dll/win32/kernel32/debug/output.c Modified: trunk/reactos/dll/win32/kernel32/debug/output.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/debug/o…
============================================================================== --- trunk/reactos/dll/win32/kernel32/debug/output.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/debug/output.c [iso-8859-1] Sat Jan 17 11:40:42 2009 @@ -4,7 +4,7 @@ * PROJECT: ReactOS system libraries * FILE: lib/kernel32/debug/debugger.c * PURPOSE: OutputDebugString() - * PROGRAMMER: KJK::Hyperion <noog(a)libero.it> + * PROGRAMMER: KJK::Hyperion <hackbunny(a)reactos.com> */ /* INCLUDES ******************************************************************/ @@ -14,6 +14,7 @@ /* FUNCTIONS *****************************************************************/ /* Open or create the mutex used to communicate with the debug monitor */ +static HANDLE K32CreateDBMonMutex(void) { @@ -63,13 +64,7 @@ return NULL; } - /* if the mutex doesn't exist, create it */ -#if 0 /* please uncomment when GCC supports SEH */ - __try - { -#else -#define __leave goto l_Cleanup -#endif + /* if the mutex doesn't exist, create it */ /* first, set up the mutex security */ /* allocate the NT AUTHORITY\SYSTEM SID */ @@ -86,7 +81,7 @@ &psidSystem); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* allocate the BUILTIN\Administrators SID */ nErrCode = RtlAllocateAndInitializeSid(&siaNTAuth, @@ -102,7 +97,7 @@ &psidAdministrators); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* allocate the Everyone SID */ nErrCode = RtlAllocateAndInitializeSid(&siaWorldAuth, @@ -118,7 +113,7 @@ &psidEveryone); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* allocate space for the SIDs too */ nDaclBufSize += RtlLengthSid(psidSystem); @@ -129,13 +124,13 @@ pDaclBuf = GlobalAlloc(GMEM_FIXED, nDaclBufSize); /* failure */ - if(pDaclBuf == NULL) __leave; + if(pDaclBuf == NULL) goto l_Cleanup; /* create the DACL */ nErrCode = RtlCreateAcl(pDaclBuf, nDaclBufSize, ACL_REVISION); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* grant the minimum required access to Everyone */ nErrCode = RtlAddAccessAllowedAce(pDaclBuf, @@ -146,7 +141,7 @@ psidEveryone); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* grant full access to BUILTIN\Administrators */ nErrCode = RtlAddAccessAllowedAce(pDaclBuf, @@ -155,7 +150,7 @@ psidAdministrators); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* grant full access to NT AUTHORITY\SYSTEM */ nErrCode = RtlAddAccessAllowedAce(pDaclBuf, @@ -164,14 +159,14 @@ psidSystem); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* create the security descriptor */ nErrCode = RtlCreateSecurityDescriptor(&sdMutexSecurity, SECURITY_DESCRIPTOR_REVISION); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* set the descriptor's DACL to the ACL we created */ nErrCode = RtlSetDaclSecurityDescriptor(&sdMutexSecurity, @@ -180,28 +175,19 @@ FALSE); /* failure */ - if(!NT_SUCCESS(nErrCode)) __leave; + if(!NT_SUCCESS(nErrCode)) goto l_Cleanup; /* create the mutex */ hMutex = CreateMutexW(&saMutexAttribs, FALSE, L"DBWinMutex"); -#if 0 - } - __finally - { -#else + l_Cleanup: -#endif - /* free the buffers */ if(pDaclBuf) GlobalFree(pDaclBuf); if(psidEveryone) RtlFreeSid(psidEveryone); if(psidAdministrators) RtlFreeSid(psidAdministrators); if(psidSystem) RtlFreeSid(psidSystem); -#if 0 - } -#endif - - return hMutex; + + return hMutex; } @@ -212,221 +198,195 @@ WINAPI OutputDebugStringA(LPCSTR _OutputString) { -#if 0 -/* FIXME: this will be pointless until GCC does SEH */ - __try - { - ULONG_PTR a_nArgs[2]; - - a_nArgs[0] = (ULONG_PTR)(strlen(_OutputString) + 1); - a_nArgs[1] = (ULONG_PTR)_OutputString; - - /* send the string to the user-mode debugger */ - RaiseException(0x40010006, 0, 2, a_nArgs); - } - __except(EXCEPTION_EXECUTE_HANDLER) - { -#endif - - /* no user-mode debugger: try the systemwide debug message monitor, or the - kernel debugger as a last resort */ - - /* mutex used to synchronize invocations of OutputDebugString */ - static HANDLE s_hDBMonMutex = NULL; - /* true if we already attempted to open/create the mutex */ - static BOOL s_bDBMonMutexTriedOpen = FALSE; - - /* local copy of the mutex handle */ - HANDLE hDBMonMutex = s_hDBMonMutex; - /* handle to the Section of the shared buffer */ - HANDLE hDBMonBuffer = NULL; - - /* pointer to the mapped view of the shared buffer. It consist of the current - process id followed by the message string */ - struct { DWORD ProcessId; CHAR Buffer[1]; } * pDBMonBuffer = NULL; - - /* event: signaled by the debug message monitor when OutputDebugString can write - to the shared buffer */ - HANDLE hDBMonBufferReady = NULL; - - /* event: to be signaled by OutputDebugString when it's done writing to the - shared buffer */ - HANDLE hDBMonDataReady = NULL; - - /* mutex not opened, and no previous attempts to open/create it */ - if(hDBMonMutex == NULL && !s_bDBMonMutexTriedOpen) - { - /* open/create the mutex */ - hDBMonMutex = K32CreateDBMonMutex(); - /* store the handle */ - s_hDBMonMutex = hDBMonMutex; - } - -#if 0 - __try - { -#endif - - /* opening the mutex failed */ - if(hDBMonMutex == NULL) - { - /* remember next time */ - s_bDBMonMutexTriedOpen = TRUE; - } - /* opening the mutex succeeded */ - else - { - do - { - /* synchronize with other invocations of OutputDebugString */ - WaitForSingleObject(hDBMonMutex, INFINITE); - - /* buffer of the system-wide debug message monitor */ - hDBMonBuffer = OpenFileMappingW(SECTION_MAP_WRITE, FALSE, L"DBWIN_BUFFER"); - - /* couldn't open the buffer: send the string to the kernel debugger */ - if(hDBMonBuffer == NULL) break; - - /* map the buffer */ - pDBMonBuffer = MapViewOfFile(hDBMonBuffer, - SECTION_MAP_READ | SECTION_MAP_WRITE, - 0, - 0, - 0); - - /* couldn't map the buffer: send the string to the kernel debugger */ - if(pDBMonBuffer == NULL) break; - - /* open the event signaling that the buffer can be accessed */ - hDBMonBufferReady = OpenEventW(SYNCHRONIZE, FALSE, L"DBWIN_BUFFER_READY"); - - /* couldn't open the event: send the string to the kernel debugger */ - if(hDBMonBufferReady == NULL) break; - - /* open the event to be signaled when the buffer has been filled */ - hDBMonDataReady = - OpenEventW(EVENT_MODIFY_STATE, FALSE, L"DBWIN_DATA_READY"); - } - while(0); - - /* we couldn't connect to the system-wide debug message monitor: send the - string to the kernel debugger */ - if(hDBMonDataReady == NULL) ReleaseMutex(hDBMonMutex); - } - -#if 0 - __try -#else - do -#endif - { - /* size of the current output block */ - SIZE_T nRoundLen; - - /* size of the remainder of the string */ - SIZE_T nOutputStringLen; - - /* output the whole string */ - nOutputStringLen = strlen(_OutputString); - - do - { - /* we're connected to the debug monitor: - write the current block to the shared buffer */ - if(hDBMonDataReady) - { - /* wait a maximum of 10 seconds for the debug monitor - to finish processing the shared buffer */ - if(WaitForSingleObject(hDBMonBufferReady, 10000) != WAIT_OBJECT_0) - { - /* timeout or failure: give up */ - break; - } - - /* write the process id into the buffer */ - pDBMonBuffer->ProcessId = GetCurrentProcessId(); - - /* write only as many bytes as they fit in the buffer */ - if(nOutputStringLen > (PAGE_SIZE - sizeof(DWORD) - 1)) - nRoundLen = PAGE_SIZE - sizeof(DWORD) - 1; - else - nRoundLen = nOutputStringLen; - - /* copy the current block into the buffer */ - memcpy(pDBMonBuffer->Buffer, _OutputString, nRoundLen); - - /* null-terminate the current block */ - pDBMonBuffer->Buffer[nRoundLen] = 0; - - /* signal that the data contains meaningful data and can be read */ - SetEvent(hDBMonDataReady); - } - /* else, send the current block to the kernel debugger */ - else - { - /* output in blocks of 512 characters */ - CHAR a_cBuffer[512]; - - /* write a maximum of 511 bytes */ - if(nOutputStringLen > (sizeof(a_cBuffer) - 2)) - nRoundLen = sizeof(a_cBuffer) - 2; - else - nRoundLen = nOutputStringLen; - - /* copy the current block */ - memcpy(a_cBuffer, _OutputString, nRoundLen); - - /* null-terminate the current block */ - a_cBuffer[nRoundLen] = 0; - - /* send the current block to the kernel debugger */ - DbgPrint("%s", a_cBuffer); - } - - /* move to the next block */ - _OutputString += nRoundLen; - nOutputStringLen -= nRoundLen; - } - /* repeat until the string has been fully output */ - while (nOutputStringLen > 0); - - } -#if 0 - /* ignore access violations and let other exceptions fall through */ - __except - ( - (GetExceptionCode() == STATUS_ACCESS_VIOLATION) ? - EXCEPTION_EXECUTE_HANDLER : - EXCEPTION_CONTINUE_SEARCH - ) - { - /* string copied verbatim from Microsoft's kernel32.dll */ - DbgPrint("\nOutputDebugString faulted during output\n"); - } -#else - while(0); -#endif - -#if 0 - } - __finally - { -#endif - - /* close all the still open resources */ - if(hDBMonBufferReady) CloseHandle(hDBMonBufferReady); - if(pDBMonBuffer) UnmapViewOfFile(pDBMonBuffer); - if(hDBMonBuffer) CloseHandle(hDBMonBuffer); - if(hDBMonDataReady) CloseHandle(hDBMonDataReady); - - /* leave the critical section */ - if(hDBMonDataReady != NULL) - ReleaseMutex(hDBMonMutex); - -#if 0 - } - } -#endif + _SEH2_TRY + { + ULONG_PTR a_nArgs[2]; + + a_nArgs[0] = (ULONG_PTR)(strlen(_OutputString) + 1); + a_nArgs[1] = (ULONG_PTR)_OutputString; + + /* send the string to the user-mode debugger */ + RaiseException(DBG_PRINTEXCEPTION_C, 0, 2, a_nArgs); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + /* no user-mode debugger: try the systemwide debug message monitor, or the + kernel debugger as a last resort */ + + /* mutex used to synchronize invocations of OutputDebugString */ + static HANDLE s_hDBMonMutex = NULL; + /* true if we already attempted to open/create the mutex */ + static BOOL s_bDBMonMutexTriedOpen = FALSE; + + /* local copy of the mutex handle */ + HANDLE hDBMonMutex = s_hDBMonMutex; + /* handle to the Section of the shared buffer */ + HANDLE hDBMonBuffer = NULL; + + /* pointer to the mapped view of the shared buffer. It consist of the current + process id followed by the message string */ + struct { DWORD ProcessId; CHAR Buffer[1]; } * pDBMonBuffer = NULL; + + /* event: signaled by the debug message monitor when OutputDebugString can write + to the shared buffer */ + HANDLE hDBMonBufferReady = NULL; + + /* event: to be signaled by OutputDebugString when it's done writing to the + shared buffer */ + HANDLE hDBMonDataReady = NULL; + + /* mutex not opened, and no previous attempts to open/create it */ + if(hDBMonMutex == NULL && !s_bDBMonMutexTriedOpen) + { + /* open/create the mutex */ + hDBMonMutex = K32CreateDBMonMutex(); + /* store the handle */ + s_hDBMonMutex = hDBMonMutex; + } + + _SEH2_TRY + { + /* opening the mutex failed */ + if(hDBMonMutex == NULL) + { + /* remember next time */ + s_bDBMonMutexTriedOpen = TRUE; + } + /* opening the mutex succeeded */ + else + { + do + { + /* synchronize with other invocations of OutputDebugString */ + WaitForSingleObject(hDBMonMutex, INFINITE); + + /* buffer of the system-wide debug message monitor */ + hDBMonBuffer = OpenFileMappingW(SECTION_MAP_WRITE, FALSE, L"DBWIN_BUFFER"); + + /* couldn't open the buffer: send the string to the kernel debugger */ + if(hDBMonBuffer == NULL) break; + + /* map the buffer */ + pDBMonBuffer = MapViewOfFile(hDBMonBuffer, + SECTION_MAP_READ | SECTION_MAP_WRITE, + 0, + 0, + 0); + + /* couldn't map the buffer: send the string to the kernel debugger */ + if(pDBMonBuffer == NULL) break; + + /* open the event signaling that the buffer can be accessed */ + hDBMonBufferReady = OpenEventW(SYNCHRONIZE, FALSE, L"DBWIN_BUFFER_READY"); + + /* couldn't open the event: send the string to the kernel debugger */ + if(hDBMonBufferReady == NULL) break; + + /* open the event to be signaled when the buffer has been filled */ + hDBMonDataReady = OpenEventW(EVENT_MODIFY_STATE, FALSE, L"DBWIN_DATA_READY"); + } + while(0); + + /* we couldn't connect to the system-wide debug message monitor: send the + string to the kernel debugger */ + if(hDBMonDataReady == NULL) ReleaseMutex(hDBMonMutex); + } + + _SEH2_TRY + { + /* size of the current output block */ + SIZE_T nRoundLen; + + /* size of the remainder of the string */ + SIZE_T nOutputStringLen; + + /* output the whole string */ + nOutputStringLen = strlen(_OutputString); + + do + { + /* we're connected to the debug monitor: + write the current block to the shared buffer */ + if(hDBMonDataReady) + { + /* wait a maximum of 10 seconds for the debug monitor + to finish processing the shared buffer */ + if(WaitForSingleObject(hDBMonBufferReady, 10000) != WAIT_OBJECT_0) + { + /* timeout or failure: give up */ + break; + } + + /* write the process id into the buffer */ + pDBMonBuffer->ProcessId = GetCurrentProcessId(); + + /* write only as many bytes as they fit in the buffer */ + if(nOutputStringLen > (PAGE_SIZE - sizeof(DWORD) - 1)) + nRoundLen = PAGE_SIZE - sizeof(DWORD) - 1; + else + nRoundLen = nOutputStringLen; + + /* copy the current block into the buffer */ + memcpy(pDBMonBuffer->Buffer, _OutputString, nRoundLen); + + /* null-terminate the current block */ + pDBMonBuffer->Buffer[nRoundLen] = 0; + + /* signal that the data contains meaningful data and can be read */ + SetEvent(hDBMonDataReady); + } + /* else, send the current block to the kernel debugger */ + else + { + /* output in blocks of 512 characters */ + CHAR a_cBuffer[512]; + + /* write a maximum of 511 bytes */ + if(nOutputStringLen > (sizeof(a_cBuffer) - 2)) + nRoundLen = sizeof(a_cBuffer) - 2; + else + nRoundLen = nOutputStringLen; + + /* copy the current block */ + memcpy(a_cBuffer, _OutputString, nRoundLen); + + /* null-terminate the current block */ + a_cBuffer[nRoundLen] = 0; + + /* send the current block to the kernel debugger */ + DbgPrint("%s", a_cBuffer); + } + + /* move to the next block */ + _OutputString += nRoundLen; + nOutputStringLen -= nRoundLen; + } + /* repeat until the string has been fully output */ + while (nOutputStringLen > 0); + } + /* ignore access violations and let other exceptions fall through */ + _SEH2_EXCEPT((_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) + { + /* string copied verbatim from Microsoft's kernel32.dll */ + DbgPrint("\nOutputDebugString faulted during output\n"); + } + _SEH2_END; + } + _SEH2_FINALLY + { + /* close all the still open resources */ + if(hDBMonBufferReady) CloseHandle(hDBMonBufferReady); + if(pDBMonBuffer) UnmapViewOfFile(pDBMonBuffer); + if(hDBMonBuffer) CloseHandle(hDBMonBuffer); + if(hDBMonDataReady) CloseHandle(hDBMonDataReady); + + /* leave the critical section */ + if(hDBMonDataReady != NULL) + ReleaseMutex(hDBMonMutex); + } + _SEH2_END; + } + _SEH2_END; } @@ -447,15 +407,15 @@ if(!NT_SUCCESS(nErrCode)) { - /* Microsoft's kernel32.dll always prints something, even in case the conversion fails */ - OutputDebugStringA(""); - } - else - { - /* output the converted string */ - OutputDebugStringA(strOut.Buffer); - - /* free the converted string */ - RtlFreeAnsiString(&strOut); - } + /* Microsoft's kernel32.dll always prints something, even in case the conversion fails */ + OutputDebugStringA(""); + } + else + { + /* output the converted string */ + OutputDebugStringA(strOut.Buffer); + + /* free the converted string */ + RtlFreeAnsiString(&strOut); + } }
15 years, 11 months
1
0
0
0
[cwittich] 38827: sync riched20_winetest to wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 17 11:13:11 2009 New Revision: 38827 URL:
http://svn.reactos.org/svn/reactos?rev=38827&view=rev
Log: sync riched20_winetest to wine 1.1.13 Modified: trunk/rostests/winetests/riched20/editor.c trunk/rostests/winetests/riched20/riched20.rbuild trunk/rostests/winetests/riched20/txtsrv.c Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
============================================================================== --- trunk/rostests/winetests/riched20/editor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/editor.c [iso-8859-1] Sat Jan 17 11:13:11 2009 @@ -621,12 +621,9 @@ SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 0, 0); ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); - todo_wine { - /* Fails on builtin because horizontal scrollbar is not being shown */ ok((signed short)(LOWORD(result)) < xpos, "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n", (signed short)(LOWORD(result)), xpos); - } SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINELEFT, 0); /* Test around end of text that doesn't end in a newline. */ @@ -1455,9 +1452,34 @@ /* FIXME: need to test unimplemented options and robustly test wparam */ static void test_EM_SETOPTIONS(void) { - HWND hwndRichEdit = new_richedit(NULL); + HWND hwndRichEdit; static const char text[] = "Hello. My name is RichEdit!"; char buffer[1024] = {0}; + DWORD dwStyle, options, oldOptions; + DWORD optionStyles = ES_AUTOVSCROLL|ES_AUTOHSCROLL|ES_NOHIDESEL| + ES_READONLY|ES_WANTRETURN|ES_SAVESEL| + ES_SELECTIONBAR|ES_VERTICAL; + + /* Test initial options. */ + hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, WS_POPUP, + 0, 0, 200, 60, NULL, NULL, + hmoduleRichEdit, NULL); + ok(hwndRichEdit != NULL, "class: %s, error: %d\n", + RICHEDIT_CLASS, (int) GetLastError()); + options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); + ok(options == 0, "Incorrect initial options %x\n", options); + DestroyWindow(hwndRichEdit); + + hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, + WS_POPUP|WS_HSCROLL|WS_VSCROLL, + 0, 0, 200, 60, NULL, NULL, + hmoduleRichEdit, NULL); + ok(hwndRichEdit != NULL, "class: %s, error: %d\n", + RICHEDIT_CLASS, (int) GetLastError()); + options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); + /* WS_[VH]SCROLL cause the ECO_AUTO[VH]SCROLL options to be set */ + ok(options == (ECO_AUTOVSCROLL|ECO_AUTOHSCROLL), + "Incorrect initial options %x\n", options); /* NEGATIVE TESTING - NO OPTIONS SET */ SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); @@ -1479,6 +1501,25 @@ SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); ok(buffer[0]==text[0], "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); + + /* EM_SETOPTIONS changes the window style, but changing the + * window style does not change the options. */ + dwStyle = GetWindowLong(hwndRichEdit, GWL_STYLE); + ok(dwStyle & ES_READONLY, "Readonly style not set by EM_SETOPTIONS\n"); + SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle & ~ES_READONLY); + options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); + ok(options & ES_READONLY, "Readonly option set by SetWindowLong\n"); + /* Confirm that the text is still read only. */ + SendMessage(hwndRichEdit, WM_CHAR, 'a', ('a' << 16) | 0x0001); + SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); + ok(buffer[0]==text[0], + "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); + + oldOptions = options; + SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle|optionStyles); + options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); + ok(options == oldOptions, + "Options set by SetWindowLong (%x -> %x)\n", oldOptions, options); DestroyWindow(hwndRichEdit); } @@ -5692,17 +5733,51 @@ { HWND hwnd; int result; + RECT rcClient; POINTL point; point.x = 0; - point.y = 50; + point.y = 40; /* multi-line control inserts CR normally */ hwnd = new_richedit(NULL); result = SendMessageA(hwnd, WM_SETTEXT, 0, - (LPARAM)"one two three four five six seven"); + (LPARAM)"one two three four five six seven\reight"); + + GetClientRect(hwnd, &rcClient); result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - ok(result == 0, "expected character index of 0 but got %d\n", result); + ok(result == 34, "expected character index of 34 but got %d\n", result); + + /* Test with points outside the bounds of the richedit control. */ + point.x = -1; + point.y = 40; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 34, "expected character index of 34 but got %d\n", result); + + point.x = 1000; + point.y = 0; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 33, "expected character index of 33 but got %d\n", result); + + point.x = 1000; + point.y = 40; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 39, "expected character index of 39 but got %d\n", result); + + point.x = 1000; + point.y = -1; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 0, "expected character index of 0 but got %d\n", result); + + point.x = 1000; + point.y = rcClient.bottom + 1; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 34, "expected character index of 34 but got %d\n", result); + + point.x = 1000; + point.y = rcClient.bottom; + result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); + todo_wine ok(result == 39, "expected character index of 39 but got %d\n", result); DestroyWindow(hwnd); } @@ -5803,7 +5878,7 @@ DestroyWindow(hwnd); } -static void test_auto_yscroll(void) +static void test_autoscroll(void) { HWND hwnd = new_richedit(NULL); int lines, ret, redraw; @@ -5832,6 +5907,32 @@ } SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); + DestroyWindow(hwnd); + + /* The WS_VSCROLL and WS_HSCROLL styles implicitly set + * auto vertical/horizontal scrolling options. */ + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP|ES_MULTILINE|WS_VSCROLL|WS_HSCROLL, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); + ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n"); + ok(ret & ECO_AUTOHSCROLL, "ECO_AUTOHSCROLL isn't set.\n"); + ret = GetWindowLong(hwnd, GWL_STYLE); + ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); + ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP|ES_MULTILINE, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); + ok(!(ret & ECO_AUTOVSCROLL), "ECO_AUTOVSCROLL is set.\n"); + ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n"); + ret = GetWindowLong(hwnd, GWL_STYLE); + ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); + ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); DestroyWindow(hwnd); } @@ -6006,6 +6107,319 @@ "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", rc.top, rc.left, rc.bottom, rc.right, expected.top, expected.left, expected.bottom, expected.right); + + DestroyWindow(hwnd); +} + +static void test_WM_GETDLGCODE(void) +{ + HWND hwnd; + UINT res, expected; + MSG msg; + + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, 0); + expected = expected | DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.message = WM_KEYDOWN; + msg.wParam = VK_RETURN; + msg.lParam = MapVirtualKey(VK_RETURN, MAPVK_VK_TO_VSC) | 0x0001; + msg.pt.x = 0; + msg.pt.y = 0; + msg.time = GetTickCount(); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = expected | DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.wParam = VK_TAB; + msg.lParam = MapVirtualKey(VK_TAB, MAPVK_VK_TO_VSC) | 0x0001; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hold_key(VK_CONTROL); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + release_key(VK_CONTROL); + + msg.wParam = 'a'; + msg.lParam = MapVirtualKey('a', MAPVK_VK_TO_VSC) | 0x0001; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.message = WM_CHAR; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); +} + +static void test_zoom(void) +{ + HWND hwnd; + UINT ret; + RECT rc; + POINT pt; + int numerator, denominator; + + hwnd = new_richedit(NULL); + GetClientRect(hwnd, &rc); + pt.x = (rc.right - rc.left) / 2; + pt.y = (rc.bottom - rc.top) / 2; + ClientToScreen(hwnd, &pt); + + /* Test initial zoom value */ + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 0, "Numerator should be initialized to 0 (got %d).\n", numerator); + ok(denominator == 0, "Denominator should be initialized to 0 (got %d).\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + /* test scroll wheel */ + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 110, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + /* Test how much the mouse wheel can zoom in and out. */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)490, (LPARAM)100); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); + + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 500, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)491, (LPARAM)100); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); + + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 491, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)20, (LPARAM)100); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); + + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, -WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 10, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)19, (LPARAM)100); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); + + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, -WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 19, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + /* Test how WM_SCROLLWHEEL treats our custom denominator. */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)50, (LPARAM)13); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); + + hold_key(VK_CONTROL); + ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), + MAKELPARAM(pt.x, pt.y)); + ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); + release_key(VK_CONTROL); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 394, "incorrect numerator is %d\n", numerator); + ok(denominator == 100, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + /* Test bounds checking on EM_SETZOOM */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)2, (LPARAM)127); + ok(ret == TRUE, "EM_SETZOOM rejected valid values (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)127, (LPARAM)2); + ok(ret == TRUE, "EM_SETZOOM rejected valid values (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)2, (LPARAM)128); + ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 127, "incorrect numerator is %d\n", numerator); + ok(denominator == 2, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)128, (LPARAM)2); + ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); + + /* See if negative numbers are accepted. */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)-100, (LPARAM)-100); + ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); + + /* See if negative numbers are accepted. */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)0, (LPARAM)100); + ok(ret == FALSE, "EM_SETZOOM failed (%d).\n", ret); + + ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); + ok(numerator == 127, "incorrect numerator is %d\n", numerator); + ok(denominator == 2, "incorrect denominator is %d\n", denominator); + ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); + + /* Reset the zoom value */ + ret = SendMessage(hwnd, EM_SETZOOM, (WPARAM)0, (LPARAM)0); + ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); DestroyWindow(hwnd); } @@ -6061,8 +6475,10 @@ test_EM_CHARFROMPOS(); test_SETPARAFORMAT(); test_word_wrap(); - test_auto_yscroll(); + test_autoscroll(); test_format_rect(); + test_WM_GETDLGCODE(); + test_zoom(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging. Modified: trunk/rostests/winetests/riched20/riched20.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/riched…
============================================================================== --- trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] Sat Jan 17 11:13:11 2009 @@ -11,6 +11,7 @@ <library>wine</library> <library>uuid</library> <library>ole32</library> + <library>oleaut32</library> <library>user32</library> <library>gdi32</library> <library>kernel32</library> Modified: trunk/rostests/winetests/riched20/txtsrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/txtsrv…
============================================================================== --- trunk/rostests/winetests/riched20/txtsrv.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/txtsrv.c [iso-8859-1] Sat Jan 17 11:13:11 2009 @@ -31,6 +31,7 @@ #include <initguid.h> #include <textserv.h> #include <wine/test.h> +#include <oleauto.h> static HMODULE hmoduleRichEdit; @@ -39,6 +40,7 @@ /* Use a special table for x86 machines to convert the thiscall * calling convention. This isn't needed on other platforms. */ #ifdef __i386__ +static ITextServicesVtbl itextServicesStdcallVtbl; #define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl) #else /* __i386__ */ #define TXTSERV_VTABLE(This) (This)->lpVtbl @@ -440,8 +442,6 @@ This, lSelBarWidth); return E_NOTIMPL; } - -static ITextServicesVtbl itextServicesStdcallVtbl; static ITextHostVtbl itextHostVtbl = { ITextHostImpl_QueryInterface, @@ -642,6 +642,30 @@ CoTaskMemFree(dummyTextHost); } +static void test_TxSetText(void) +{ + HRESULT hres; + BSTR rettext; + WCHAR settext[] = {'T','e','s','t',0}; + + if (!init_texthost()) + return; + + hres = ITextServices_TxSetText(txtserv, settext); + todo_wine ok(hres == S_OK, "ITextServices_TxSetText failed\n"); + + hres = ITextServices_TxGetText(txtserv, &rettext); + todo_wine ok(hres == S_OK, "ITextServices_TxGetText failed\n"); + + todo_wine ok(SysStringLen(rettext) == 4, + "String returned of wrong length\n"); + todo_wine ok(memcmp(rettext,settext,SysStringByteLen(rettext)) == 0, + "String returned differs\n"); + + IUnknown_Release(txtserv); + CoTaskMemFree(dummyTextHost); +} + START_TEST( txtsrv ) { setup_thiscall_wrappers(); @@ -657,6 +681,7 @@ CoTaskMemFree(dummyTextHost); test_TxGetText(); + test_TxSetText(); } if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE); }
15 years, 11 months
1
0
0
0
[gedmurphy] 38826: add new chinese resource file
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Sat Jan 17 11:11:13 2009 New Revision: 38826 URL:
http://svn.reactos.org/svn/reactos?rev=38826&view=rev
Log: add new chinese resource file Added: trunk/reactos/dll/win32/comctl32/comctl_Zh.rc (with props) Added: 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 (added) +++ trunk/reactos/dll/win32/comctl32/comctl_Zh.rc [iso-8859-1] Sat Jan 17 11:11:13 2009 @@ -1,0 +1,165 @@ +/* + * comctl32 (simplified and traditional Chinese resources) + * + * Copyright 2002 Tisheng Chen + * Copyright 2008 Hongbo Ni <
hongbo.at.njstar.com
> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* Chinese text is encoded in UTF-8 */ +#pragma code_page(65001) + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + +IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140 +STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "å±æ§ %s" +FONT 9, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "ç¡®å®", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP + PUSHBUTTON "åæ¶", IDCANCEL,58,122,50,14 + PUSHBUTTON "åºç¨(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED + PUSHBUTTON "帮å©", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114 +END + + +IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "å导" +FONT 9, "MS Shell Dlg" +BEGIN + PUSHBUTTON "< ä¸ä¸æ¥(&B)", IDC_BACK_BUTTON,71,138,50,14 + DEFPUSHBUTTON "ä¸ä¸æ¥(&N) >", IDC_NEXT_BUTTON,121,138,50,14 + DEFPUSHBUTTON "ç»æ", IDC_FINISH_BUTTON,121,138,50,14 + PUSHBUTTON "åæ¶", IDCANCEL,178,138,50,14 + PUSHBUTTON "帮å©", IDHELP,235,138,50,14,WS_GROUP + LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5 + LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE +END + + +IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "èªå®ä¹å·¥å ·æ " +FONT 9, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "å ³é(&C)", IDCANCEL,308,6,44,14 + PUSHBUTTON "éç½®(&e)", IDC_RESET_BTN,308,23,44,14 + PUSHBUTTON "帮å©(&H)", IDC_HELP_BTN,308,40,44,14 + PUSHBUTTON "ä¸ç§»(&U)", IDC_MOVEUP_BTN,308,74,44,14 + PUSHBUTTON "ä¸ç§»(&D)", IDC_MOVEDN_BTN,308,91,44,14 + LTEXT "å¯ç¨å·¥å ·æ æé®(&V):", -1,4,5,84,10 + LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + PUSHBUTTON "æ·»å (&A) ->", IDOK, 131, 42, 44, 14 + PUSHBUTTON "<- å é¤(&R)", IDC_REMOVE_BTN,131,62,44,14 + LTEXT "å½åå·¥å ·æ æé®(&T):", -1,182,5,78,10 + LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP +END + +STRINGTABLE DISCARDABLE +{ + IDS_CLOSE "å ³é" +} + +STRINGTABLE DISCARDABLE +{ + IDM_TODAY "ä»å¤©:" + IDM_GOTODAY "转å°ä»å¤©" +} + +STRINGTABLE DISCARDABLE +{ + IDS_SEPARATOR "åé符" +} + +STRINGTABLE DISCARDABLE +{ + HKY_NONE "æ " +} + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + +IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140 +STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "å±¬æ§ %s" +FONT 9, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "確å®", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP + PUSHBUTTON "åæ¶", IDCANCEL,58,122,50,14 + PUSHBUTTON "å¥ç¨(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED + PUSHBUTTON "幫å©", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114 +END + + +IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "åå°" +FONT 9, "MS Shell Dlg" +BEGIN + PUSHBUTTON "< ä¸ä¸æ¥(&B)", IDC_BACK_BUTTON,71,138,50,14 + DEFPUSHBUTTON "ä¸ä¸æ¥(&N) >", IDC_NEXT_BUTTON,121,138,50,14 + DEFPUSHBUTTON "çµæ", IDC_FINISH_BUTTON,121,138,50,14 + PUSHBUTTON "åæ¶", IDCANCEL,178,138,50,14 + PUSHBUTTON "幫å©", IDHELP,235,138,50,14,WS_GROUP + LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5 + LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE +END + + +IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "èªå®ç¾©å·¥å ·æ¬" +FONT 9, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "éé(&C)", IDCANCEL,308,6,44,14 + PUSHBUTTON "éç½®(&e)", IDC_RESET_BTN,308,23,44,14 + PUSHBUTTON "幫å©(&H)", IDC_HELP_BTN,308,40,44,14 + PUSHBUTTON "ä¸ç§»(&U)", IDC_MOVEUP_BTN,308,74,44,14 + PUSHBUTTON "ä¸ç§»(&D)", IDC_MOVEDN_BTN,308,91,44,14 + LTEXT "å¯ç¨å·¥å ·æ¬æé(&V):", -1,4,5,84,10 + LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + PUSHBUTTON "æ·»å (&A) ->", IDOK, 131, 42, 44, 14 + PUSHBUTTON "<- åªé¤(&R)", IDC_REMOVE_BTN,131,62,44,14 + LTEXT "ç¶åå·¥å ·æ¬æé(&T):", -1,182,5,78,10 + LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP +END + +STRINGTABLE DISCARDABLE +{ + IDS_CLOSE "éé" +} + +STRINGTABLE DISCARDABLE +{ + IDM_TODAY "ä»å¤©:" + IDM_GOTODAY "è½å°ä»å¤©" +} + +STRINGTABLE DISCARDABLE +{ + IDS_SEPARATOR "åé符" +} + +STRINGTABLE DISCARDABLE +{ + HKY_NONE "ç¡" +} + +#pragma code_page(default) Propchange: trunk/reactos/dll/win32/comctl32/comctl_Zh.rc ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 11 months
1
0
0
0
[cwittich] 38825: sync riched20 to wine 1.1.13
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 17 11:11:08 2009 New Revision: 38825 URL:
http://svn.reactos.org/svn/reactos?rev=38825&view=rev
Log: sync riched20 to wine 1.1.13 Modified: trunk/reactos/dll/win32/riched20/caret.c trunk/reactos/dll/win32/riched20/editor.c trunk/reactos/dll/win32/riched20/editor.h trunk/reactos/dll/win32/riched20/editstr.h trunk/reactos/dll/win32/riched20/list.c trunk/reactos/dll/win32/riched20/paint.c trunk/reactos/dll/win32/riched20/para.c trunk/reactos/dll/win32/riched20/richole.c trunk/reactos/dll/win32/riched20/wrap.c trunk/reactos/include/psdk/richedit.h trunk/reactos/include/psdk/textserv.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/riched20/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/caret.c…
Modified: trunk/reactos/dll/win32/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editstr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editstr…
Modified: trunk/reactos/dll/win32/riched20/list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/list.c?…
Modified: trunk/reactos/dll/win32/riched20/paint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/paint.c…
Modified: trunk/reactos/dll/win32/riched20/para.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/para.c?…
Modified: trunk/reactos/dll/win32/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/richole…
Modified: trunk/reactos/dll/win32/riched20/wrap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/wrap.c?…
Modified: trunk/reactos/include/psdk/richedit.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/richedit.h?re…
Modified: trunk/reactos/include/psdk/textserv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/textserv.h?re…
15 years, 11 months
1
0
0
0
[gedmurphy] 38824: update spying messages set TB_GETIMAGELISTCOUNT to have an lparam length of 0
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Sat Jan 17 11:03:50 2009 New Revision: 38824 URL:
http://svn.reactos.org/svn/reactos?rev=38824&view=rev
Log: update spying messages set TB_GETIMAGELISTCOUNT to have an lparam length of 0 Modified: trunk/reactos/dll/win32/user32/windows/spy.c Modified: trunk/reactos/dll/win32/user32/windows/spy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/s…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] Sat Jan 17 11:03:50 2009 @@ -1455,10 +1455,10 @@ USM(TB_GETSTRINGW ,0), USM(TB_GETSTRINGA ,0), USM(TB_UNKWN45D ,8), - USM(TB_UNKWN45E ,0), - USM(TB_UNKWN460 ,0), - USM(TB_UNKWN463 ,8), - USM(TB_UNKWN464 ,0), + USM(TB_SETHOTITEM2 ,0), + USM(TB_SETLISTGAP ,0), + USM(TB_GETIMAGELISTCOUNT ,0), + USM(TB_GETIDEALSIZE ,0), {0,0,0} }; static const USER_MSG tooltips_array[] = {
15 years, 11 months
1
0
0
0
[gedmurphy] 38823: add new file
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Sat Jan 17 10:48:52 2009 New Revision: 38823 URL:
http://svn.reactos.org/svn/reactos?rev=38823&view=rev
Log: add new file Added: trunk/reactos/dll/win32/comctl32/theme_button.c (with props) Added: trunk/reactos/dll/win32/comctl32/theme_button.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_b…
============================================================================== --- trunk/reactos/dll/win32/comctl32/theme_button.c (added) +++ trunk/reactos/dll/win32/comctl32/theme_button.c [iso-8859-1] Sat Jan 17 10:48:52 2009 @@ -1,0 +1,317 @@ +/* + * Theming - Button control + * + * Copyright (c) 2008 by Reece H. Dunn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include <stdarg.h> +#include <string.h> +#include <stdlib.h> + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "uxtheme.h" +#include "tmschema.h" +#include "comctl32.h" + +#define BUTTON_TYPE 0x0f /* bit mask for the available button types */ + +/* These are indices into a states array to determine the theme state for a given theme part. */ +typedef enum +{ + STATE_NORMAL, + STATE_DISABLED, + STATE_HOT, + STATE_PRESSED, + STATE_DEFAULTED +} ButtonState; + +typedef void (*pfThemedPaint)(HTHEME theme, HWND hwnd, HDC hdc, ButtonState drawState, UINT dtFlags); + +static UINT get_drawtext_flags(DWORD style, DWORD ex_style) +{ + UINT flags = 0; + + if (style & BS_PUSHLIKE) + style &= ~BUTTON_TYPE; + + if (!(style & BS_MULTILINE)) + flags |= DT_SINGLELINE; + else + flags |= DT_WORDBREAK; + + switch (style & BS_CENTER) + { + case BS_LEFT: flags |= DT_LEFT; break; + case BS_RIGHT: flags |= DT_RIGHT; break; + case BS_CENTER: flags |= DT_CENTER; break; + default: + flags |= ((style & BUTTON_TYPE) <= BS_DEFPUSHBUTTON) + ? DT_CENTER : DT_LEFT; + } + + if (ex_style & WS_EX_RIGHT) + flags = DT_RIGHT | (flags & ~(DT_LEFT | DT_CENTER)); + + if ((style & BUTTON_TYPE) != BS_GROUPBOX) + { + switch (style & BS_VCENTER) + { + case BS_TOP: flags |= DT_TOP; break; + case BS_BOTTOM: flags |= DT_BOTTOM; break; + case BS_VCENTER: /* fall through */ + default: flags |= DT_VCENTER; break; + } + } + else + /* GroupBox's text is always single line and is top aligned. */ + flags |= DT_SINGLELINE | DT_TOP; + + return flags; +} + +static inline WCHAR *get_button_text(HWND hwnd) +{ + INT len = 512; + WCHAR *text; + text = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); + if (text) InternalGetWindowText(hwnd, text, len + 1); + return text; +} + +static void PB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UINT dtFlags) +{ + static const int states[] = { PBS_NORMAL, PBS_DISABLED, PBS_HOT, PBS_PRESSED, PBS_DEFAULTED }; + + RECT bgRect, textRect; + HFONT font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); + HFONT hPrevFont = font ? SelectObject(hDC, font) : NULL; + int state = states[ drawState ]; + WCHAR *text = get_button_text(hwnd); + + GetClientRect(hwnd, &bgRect); + GetThemeBackgroundContentRect(theme, hDC, BP_PUSHBUTTON, state, &bgRect, &textRect); + + if (IsThemeBackgroundPartiallyTransparent(theme, BP_PUSHBUTTON, state)) + DrawThemeParentBackground(hwnd, hDC, NULL); + DrawThemeBackground(theme, hDC, BP_PUSHBUTTON, state, &bgRect, NULL); + if (text) + { + DrawThemeText(theme, hDC, BP_PUSHBUTTON, state, text, lstrlenW(text), dtFlags, 0, &textRect); + HeapFree(GetProcessHeap(), 0, text); + } + + if (hPrevFont) SelectObject(hDC, hPrevFont); +} + +static void CB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UINT dtFlags) +{ + static const int cb_states[3][5] = + { + { CBS_UNCHECKEDNORMAL, CBS_UNCHECKEDDISABLED, CBS_UNCHECKEDHOT, CBS_UNCHECKEDPRESSED, CBS_UNCHECKEDNORMAL }, + { CBS_CHECKEDNORMAL, CBS_CHECKEDDISABLED, CBS_CHECKEDHOT, CBS_CHECKEDPRESSED, CBS_CHECKEDNORMAL }, + { CBS_MIXEDNORMAL, CBS_MIXEDDISABLED, CBS_MIXEDHOT, CBS_MIXEDPRESSED, CBS_MIXEDNORMAL } + }; + + static const int rb_states[2][5] = + { + { RBS_UNCHECKEDNORMAL, RBS_UNCHECKEDDISABLED, RBS_UNCHECKEDHOT, RBS_UNCHECKEDPRESSED, RBS_UNCHECKEDNORMAL }, + { RBS_CHECKEDNORMAL, RBS_CHECKEDDISABLED, RBS_CHECKEDHOT, RBS_CHECKEDPRESSED, RBS_CHECKEDNORMAL } + }; + + static const int cb_size = 13; + + RECT bgRect, textRect; + HFONT font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); + HFONT hPrevFont = font ? SelectObject(hDC, font) : NULL; + LRESULT checkState = SendMessageW(hwnd, BM_GETCHECK, 0, 0); + DWORD dwStyle = GetWindowLongW(hwnd, GWL_STYLE); + int part = ((dwStyle & BUTTON_TYPE) == BS_RADIOBUTTON) || ((dwStyle & BUTTON_TYPE) == BS_AUTORADIOBUTTON) + ? BP_RADIOBUTTON + : BP_CHECKBOX; + int state = (part == BP_CHECKBOX) + ? cb_states[ checkState ][ drawState ] + : rb_states[ checkState ][ drawState ]; + WCHAR *text = get_button_text(hwnd); + + GetClientRect(hwnd, &bgRect); + GetThemeBackgroundContentRect(theme, hDC, part, state, &bgRect, &textRect); + + if (dtFlags & DT_SINGLELINE) /* Center the checkbox / radio button to the text. */ + bgRect.top = bgRect.top + (textRect.bottom - textRect.top - cb_size) / 2; + + /* adjust for the check/radio marker */ + bgRect.bottom = bgRect.top + cb_size; + bgRect.right = bgRect.left + cb_size; + textRect.left = bgRect.right + 6; + + if (IsThemeBackgroundPartiallyTransparent(theme, part, state)) + DrawThemeParentBackground(hwnd, hDC, NULL); + DrawThemeBackground(theme, hDC, part, state, &bgRect, NULL); + if (text) + { + DrawThemeText(theme, hDC, part, state, text, lstrlenW(text), dtFlags, 0, &textRect); + HeapFree(GetProcessHeap(), 0, text); + } + + if (hPrevFont) SelectObject(hDC, hPrevFont); +} + +static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UINT dtFlags) +{ + static const int states[] = { GBS_NORMAL, GBS_DISABLED, GBS_NORMAL, GBS_NORMAL, GBS_NORMAL }; + + RECT bgRect, textRect, contentRect; + HFONT font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); + HFONT hPrevFont = font ? SelectObject(hDC, font) : NULL; + int state = states[ drawState ]; + WCHAR *text = get_button_text(hwnd); + + GetClientRect(hwnd, &bgRect); + textRect = bgRect; + + if (text) + { + SIZE textExtent; + GetTextExtentPoint32W(hDC, text, lstrlenW(text), &textExtent); + bgRect.top += (textExtent.cy / 2); + textRect.left += 10; + textRect.bottom = textRect.top + textExtent.cy; + textRect.right = textRect.left + textExtent.cx + 4; + + ExcludeClipRect(hDC, textRect.left, textRect.top, textRect.right, textRect.bottom); + } + + GetThemeBackgroundContentRect(theme, hDC, BP_GROUPBOX, state, &bgRect, &contentRect); + ExcludeClipRect(hDC, contentRect.left, contentRect.top, contentRect.right, contentRect.bottom); + + if (IsThemeBackgroundPartiallyTransparent(theme, BP_GROUPBOX, state)) + DrawThemeParentBackground(hwnd, hDC, NULL); + DrawThemeBackground(theme, hDC, BP_GROUPBOX, state, &bgRect, NULL); + + SelectClipRgn(hDC, NULL); + + if (text) + { + textRect.left += 2; + textRect.right -= 2; + DrawThemeText(theme, hDC, BP_GROUPBOX, state, text, lstrlenW(text), 0, 0, &textRect); + HeapFree(GetProcessHeap(), 0, text); + } + + if (hPrevFont) SelectObject(hDC, hPrevFont); +} + +static const pfThemedPaint btnThemedPaintFunc[BUTTON_TYPE + 1] = +{ + PB_draw, /* BS_PUSHBUTTON */ + PB_draw, /* BS_DEFPUSHBUTTON */ + CB_draw, /* BS_CHECKBOX */ + CB_draw, /* BS_AUTOCHECKBOX */ + CB_draw, /* BS_RADIOBUTTON */ + CB_draw, /* BS_3STATE */ + CB_draw, /* BS_AUTO3STATE */ + GB_draw, /* BS_GROUPBOX */ + NULL, /* BS_USERBUTTON */ + CB_draw, /* BS_AUTORADIOBUTTON */ + NULL, /* Not defined */ + NULL, /* BS_OWNERDRAW */ + NULL, /* Not defined */ + NULL, /* Not defined */ + NULL, /* Not defined */ + NULL, /* Not defined */ +}; + +static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC) +{ + PAINTSTRUCT ps; + HDC hDC; + DWORD dwStyle = GetWindowLongW(hwnd, GWL_STYLE); + DWORD dwStyleEx = GetWindowLongW(hwnd, GWL_EXSTYLE); + UINT dtFlags = get_drawtext_flags(dwStyle, dwStyleEx); + ButtonState drawState = IsWindowEnabled(hwnd) ? STATE_NORMAL : STATE_DISABLED; + pfThemedPaint paint = btnThemedPaintFunc[ dwStyle & BUTTON_TYPE ]; + + if (paint) + { + hDC = hParamDC ? hParamDC : BeginPaint(hwnd, &ps); + paint(theme, hwnd, hDC, drawState, dtFlags); + if (!hParamDC) EndPaint(hwnd, &ps); + return TRUE; + } + + return FALSE; /* Delegate drawing to the non-themed code. */ +} + +/********************************************************************** + * The button control subclass window proc. + */ +LRESULT CALLBACK THEMING_ButtonSubclassProc(HWND hwnd, UINT msg, + WPARAM wParam, LPARAM lParam, + ULONG_PTR dwRefData) +{ + const WCHAR* themeClass = WC_BUTTONW; + HTHEME theme; + LRESULT result; + + switch (msg) + { + case WM_CREATE: + result = THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + OpenThemeData(hwnd, themeClass); + return result; + + case WM_DESTROY: + theme = GetWindowTheme(hwnd); + CloseThemeData (theme); + return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + + case WM_THEMECHANGED: + theme = GetWindowTheme(hwnd); + CloseThemeData (theme); + OpenThemeData(hwnd, themeClass); + break; + + case WM_SYSCOLORCHANGE: + theme = GetWindowTheme(hwnd); + if (!theme) return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + /* Do nothing. When themed, a WM_THEMECHANGED will be received, too, + * which will do the repaint. */ + break; + + case WM_PAINT: + theme = GetWindowTheme(hwnd); + if (theme && BUTTON_Paint(theme, hwnd, (HDC)wParam)) + return 0; + else + return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + + case WM_ENABLE: + theme = GetWindowTheme(hwnd); + if (theme) RedrawWindow(hwnd, NULL, NULL, + RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW); + return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + + default: + /* Call old proc */ + return THEMING_CallOriginalClass(hwnd, msg, wParam, lParam); + } + return 0; +} Propchange: trunk/reactos/dll/win32/comctl32/theme_button.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 11 months
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
76
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Results per page:
10
25
50
100
200