ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
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
June 2016
----- 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
17 participants
228 discussions
Start a n
N
ew thread
[akhaldi] 71547: [GDIPLUS_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 19:09:10 2016 New Revision: 71547 URL:
http://svn.reactos.org/svn/reactos?rev=71547&view=rev
Log: [GDIPLUS_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/rostests/winetests/gdiplus/graphicspath.c trunk/rostests/winetests/gdiplus/image.c trunk/rostests/winetests/gdiplus/metafile.c Modified: trunk/rostests/winetests/gdiplus/graphicspath.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/graphic…
============================================================================== --- trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] Sun Jun 5 19:09:10 2016 @@ -1018,6 +1018,9 @@ status = GdipFlattenPath(path, NULL, 1.0); expect(Ok, status); + status = GdipTransformPath(path, 0); + expect(Ok, status); + status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0); expect(Ok, status); Modified: trunk/rostests/winetests/gdiplus/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/image.c…
============================================================================== --- trunk/rostests/winetests/gdiplus/image.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/image.c [iso-8859-1] Sun Jun 5 19:09:10 2016 @@ -1466,36 +1466,36 @@ stat = GdipGetImageBounds(img, &bounds, &unit); expect(Ok, stat); - todo_wine expect(UnitPixel, unit); + expect(UnitPixel, unit); expectf(0.0, bounds.X); expectf(0.0, bounds.Y); - todo_wine expectf(320.0, bounds.Width); - todo_wine expectf(320.0, bounds.Height); + expectf(320.0, bounds.Width); + expectf(320.0, bounds.Height); stat = GdipGetImageHorizontalResolution(img, &res); expect(Ok, stat); - todo_wine expectf(1440.0, res); + expectf(1440.0, res); stat = GdipGetImageVerticalResolution(img, &res); expect(Ok, stat); - todo_wine expectf(1440.0, res); + expectf(1440.0, res); memset(&header, 0, sizeof(header)); stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, &header); expect(Ok, stat); if (stat == Ok) { - todo_wine expect(MetafileTypeWmfPlaceable, header.Type); + expect(MetafileTypeWmfPlaceable, header.Type); todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); todo_wine expect(0x300, header.Version); expect(0, header.EmfPlusFlags); - todo_wine expectf(1440.0, header.DpiX); - todo_wine expectf(1440.0, header.DpiY); + expectf(1440.0, header.DpiX); + expectf(1440.0, header.DpiY); expect(0, header.X); expect(0, header.Y); - todo_wine expect(320, header.Width); - todo_wine expect(320, header.Height); - todo_wine expect(1, U(header).WmfHeader.mtType); + expect(320, header.Width); + expect(320, header.Height); + expect(1, U(header).WmfHeader.mtType); expect(0, header.EmfPlusHeaderSize); expect(0, header.LogicalDpiX); expect(0, header.LogicalDpiY); @@ -1543,17 +1543,17 @@ expect(Ok, stat); if (stat == Ok) { - todo_wine expect(MetafileTypeWmfPlaceable, header.Type); + expect(MetafileTypeWmfPlaceable, header.Type); todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); todo_wine expect(0x300, header.Version); expect(0, header.EmfPlusFlags); - todo_wine expectf(1440.0, header.DpiX); - todo_wine expectf(1440.0, header.DpiY); + expectf(1440.0, header.DpiX); + expectf(1440.0, header.DpiY); expect(0, header.X); expect(0, header.Y); - todo_wine expect(320, header.Width); - todo_wine expect(320, header.Height); - todo_wine expect(1, U(header).WmfHeader.mtType); + expect(320, header.Width); + expect(320, header.Height); + expect(1, U(header).WmfHeader.mtType); expect(0, header.EmfPlusHeaderSize); expect(0, header.LogicalDpiX); expect(0, header.LogicalDpiY); Modified: trunk/rostests/winetests/gdiplus/metafile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/metafil…
============================================================================== --- trunk/rostests/winetests/gdiplus/metafile.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/metafile.c [iso-8859-1] Sun Jun 5 19:09:10 2016 @@ -867,6 +867,117 @@ expect(Ok, stat); } +static void test_nullframerect(void) { + GpStatus stat; + GpMetafile *metafile; + GpGraphics *graphics; + HDC hdc, metafile_dc; + static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + GpBrush *brush; + HBRUSH hbrush, holdbrush; + GpRectF bounds; + GpUnit unit; + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, NULL, MetafileFrameUnitPixel, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + if (stat != Ok) + return; + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(1.0, bounds.Width); + expectf(1.0, bounds.Height); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipCreateSolidFill((ARGB)0xff0000ff, (GpSolidFill**)&brush); + expect(Ok, stat); + + stat = GdipFillRectangleI(graphics, brush, 25, 25, 75, 75); + expect(Ok, stat); + + stat = GdipDeleteBrush(brush); + expect(Ok, stat); + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(1.0, bounds.Width); + expectf(1.0, bounds.Height); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + todo_wine expectf_(25.0, bounds.X, 0.05); + todo_wine expectf_(25.0, bounds.Y, 0.05); + todo_wine expectf_(75.0, bounds.Width, 0.05); + todo_wine expectf_(75.0, bounds.Height, 0.05); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, NULL, MetafileFrameUnitMillimeter, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipGetDC(graphics, &metafile_dc); + expect(Ok, stat); + + if (stat != Ok) + { + GdipDeleteGraphics(graphics); + GdipDisposeImage((GpImage*)metafile); + return; + } + + hbrush = CreateSolidBrush(0xff0000); + + holdbrush = SelectObject(metafile_dc, hbrush); + + Rectangle(metafile_dc, 25, 25, 75, 75); + + SelectObject(metafile_dc, holdbrush); + + DeleteObject(hbrush); + + stat = GdipReleaseDC(graphics, metafile_dc); + expect(Ok, stat); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf_(25.0, bounds.X, 0.05); + expectf_(25.0, bounds.Y, 0.05); + todo_wine expectf_(50.0, bounds.Width, 0.05); + todo_wine expectf_(50.0, bounds.Height, 0.05); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); +} + static const emfplus_record pagetransform_records[] = { {0, EMR_HEADER}, {0, EmfPlusRecordTypeHeader}, @@ -1146,6 +1257,68 @@ expect(Ok, stat); } +static void test_frameunit(void) +{ + GpStatus stat; + GpMetafile *metafile; + GpGraphics *graphics; + HDC hdc; + static const GpRectF frame = {0.0, 0.0, 5.0, 5.0}; + static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + GpUnit unit; + REAL dpix, dpiy; + GpRectF bounds; + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitInch, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + if (stat != Ok) + return; + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(1.0, bounds.Width); + expectf(1.0, bounds.Height); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf(1.0, bounds.Width); + expectf(1.0, bounds.Height); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + stat = GdipGetImageHorizontalResolution((GpImage*)metafile, &dpix); + expect(Ok, stat); + + stat = GdipGetImageVerticalResolution((GpImage*)metafile, &dpiy); + expect(Ok, stat); + + stat = GdipGetImageBounds((GpImage*)metafile, &bounds, &unit); + expect(Ok, stat); + expect(UnitPixel, unit); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); + expectf_(5.0 * dpix, bounds.Width, 1.0); + expectf_(5.0 * dpiy, bounds.Height, 1.0); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); +} + START_TEST(metafile) { struct GdiplusStartupInput gdiplusStartupInput; @@ -1169,8 +1342,10 @@ test_getdc(); test_emfonly(); test_fillrect(); + test_nullframerect(); test_pagetransform(); test_converttoemfplus(); + test_frameunit(); GdiplusShutdown(gdiplusToken); }
8 years, 5 months
1
0
0
0
[akhaldi] 71546: [GDIPLUS] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 19:08:07 2016 New Revision: 71546 URL:
http://svn.reactos.org/svn/reactos?rev=71546&view=rev
Log: [GDIPLUS] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.spec trunk/reactos/dll/win32/gdiplus/gdiplus_private.h trunk/reactos/dll/win32/gdiplus/graphics.c trunk/reactos/dll/win32/gdiplus/graphicspath.c trunk/reactos/dll/win32/gdiplus/image.c trunk/reactos/dll/win32/gdiplus/metafile.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/gdiplus.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/gdiplus.spec [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -303,7 +303,7 @@ 303 stdcall GdipGetMetafileHeaderFromFile(wstr ptr) 304 stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr) 305 stdcall GdipGetMetafileHeaderFromStream(ptr ptr) -306 stub GdipGetMetafileHeaderFromWmf +306 stdcall GdipGetMetafileHeaderFromWmf(ptr ptr ptr) 307 stdcall GdipGetNearestColor(ptr ptr) 308 stdcall GdipGetPageScale(ptr ptr) 309 stdcall GdipGetPageUnit(ptr ptr) Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus_…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/gdiplus_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/gdiplus_private.h [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -327,7 +327,6 @@ }; struct GpImage{ - IPicture *picture; IWICBitmapDecoder *decoder; ImageType type; GUID format; @@ -351,6 +350,7 @@ BYTE *comment_data; DWORD comment_data_size; DWORD comment_data_length; + IStream *record_stream; /* playback */ GpGraphics *playback_graphics; Modified: trunk/reactos/dll/win32/gdiplus/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -2893,23 +2893,7 @@ srcheight = units_to_pixels(srcheight, srcUnit, image->yres); TRACE("src pixels: %f,%f %fx%f\n", srcx, srcy, srcwidth, srcheight); - if (image->picture) - { - if (!graphics->hdc) - { - FIXME("graphics object has no HDC\n"); - } - - if(IPicture_Render(image->picture, graphics->hdc, - pti[0].x, pti[0].y, pti[1].x - pti[0].x, pti[2].y - pti[0].y, - srcx, srcy, srcwidth, srcheight, NULL) != S_OK) - { - if(callback) - callback(callbackData); - return GenericError; - } - } - else if (image->type == ImageTypeBitmap) + if (image->type == ImageTypeBitmap) { GpBitmap* bitmap = (GpBitmap*)image; BOOL do_resampling = FALSE; @@ -6432,13 +6416,6 @@ brush, positions, flags, matrix); } -GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream *stream, HDC hdc, EmfType type, GDIPCONST GpRect *frameRect, - MetafileFrameUnit frameUnit, GDIPCONST WCHAR *desc, GpMetafile **metafile) -{ - FIXME("(%p %p %d %p %d %p %p): stub\n", stream, hdc, type, frameRect, frameUnit, desc, metafile); - return NotImplemented; -} - /***************************************************************************** * GdipIsVisibleClipEmpty [GDIPLUS.@] */ Modified: trunk/reactos/dll/win32/gdiplus/graphicspath.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/graphicspath.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/graphicspath.c [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -1202,11 +1202,9 @@ if(path->pathdata.Count == 0) return Ok; - if(matrix){ - stat = GdipTransformPath(path, matrix); - if (stat != Ok) - return stat; - } + stat = GdipTransformPath(path, matrix); + if(stat != Ok) + return stat; pt = path->pathdata.Points[0]; if(!init_path_list(&list, pt.X, pt.Y)) @@ -1663,7 +1661,7 @@ if(!path) return InvalidParameter; - if(path->pathdata.Count == 0) + if(path->pathdata.Count == 0 || !matrix) return Ok; return GdipTransformMatrixPoints(matrix, path->pathdata.Points, Modified: trunk/reactos/dll/win32/gdiplus/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/image.c?…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/image.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/image.c [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -1,6 +1,6 @@ /* * Copyright (C) 2007 Google (Evan Stade) - * Copyright (C) 2012 Dmitry Timoshkov + * Copyright (C) 2012,2016 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -105,34 +105,6 @@ } IWICImagingFactory_Release(factory); return palette; -} - -static INT ipicture_pixel_height(IPicture *pic) -{ - HDC hdcref; - OLE_YSIZE_HIMETRIC y; - - IPicture_get_Height(pic, &y); - - hdcref = CreateCompatibleDC(0); - y = MulDiv(y, GetDeviceCaps(hdcref, LOGPIXELSY), INCH_HIMETRIC); - DeleteDC(hdcref); - - return y; -} - -static INT ipicture_pixel_width(IPicture *pic) -{ - HDC hdcref; - OLE_XSIZE_HIMETRIC x; - - IPicture_get_Width(pic, &x); - - hdcref = CreateCompatibleDC(0); - x = MulDiv(x, GetDeviceCaps(hdcref, LOGPIXELSX), INCH_HIMETRIC); - DeleteDC(hdcref); - - return x; } GpStatus WINGDIPAPI GdipBitmapApplyEffect(GpBitmap* bitmap, CGpEffect* effect, @@ -1292,45 +1264,12 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) { - GpStatus stat = GenericError; - TRACE("%p, %p\n", image, cloneImage); if (!image || !cloneImage) return InvalidParameter; - if (image->picture) - { - IStream* stream; - HRESULT hr; - INT size; - LARGE_INTEGER move; - - hr = CreateStreamOnHGlobal(0, TRUE, &stream); - if (FAILED(hr)) - return GenericError; - - hr = IPicture_SaveAsFile(image->picture, stream, FALSE, &size); - if(FAILED(hr)) - { - WARN("Failed to save image on stream\n"); - goto out; - } - - /* Set seek pointer back to the beginning of the picture */ - move.QuadPart = 0; - hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL); - if (FAILED(hr)) - goto out; - - stat = GdipLoadImageFromStream(stream, cloneImage); - if (stat != Ok) WARN("Failed to load image from stream\n"); - - out: - IStream_Release(stream); - return stat; - } - else if (image->type == ImageTypeBitmap) + if (image->type == ImageTypeBitmap) { GpBitmap *bitmap = (GpBitmap *)image; @@ -1867,7 +1806,6 @@ (*bitmap)->width = width; (*bitmap)->height = height; (*bitmap)->format = format; - (*bitmap)->image.picture = NULL; (*bitmap)->image.decoder = NULL; (*bitmap)->hbitmap = hbitmap; (*bitmap)->hdc = NULL; @@ -2125,14 +2063,16 @@ metafile->record_graphics->image = NULL; metafile->record_graphics->busy = TRUE; } + if (metafile->record_stream) + { + IStream_Release(metafile->record_stream); + } } else { WARN("invalid image: %p\n", image); return ObjectBusy; } - if (image->picture) - IPicture_Release(image->picture); if (image->decoder) IWICBitmapDecoder_Release(image->decoder); heap_free(image->palette); @@ -2198,12 +2138,6 @@ srcRect->Height = (REAL) ((GpBitmap*)image)->height; *srcUnit = UnitPixel; } - else{ - srcRect->X = srcRect->Y = 0.0; - srcRect->Width = ipicture_pixel_width(image->picture); - srcRect->Height = ipicture_pixel_height(image->picture); - *srcUnit = UnitPixel; - } TRACE("returning (%f, %f) (%f, %f) unit type %d\n", srcRect->X, srcRect->Y, srcRect->Width, srcRect->Height, *srcUnit); @@ -2226,10 +2160,6 @@ else if(image->type == ImageTypeBitmap){ *height = ((GpBitmap*)image)->height; *width = ((GpBitmap*)image)->width; - } - else{ - *height = ipicture_pixel_height(image->picture); - *width = ipicture_pixel_width(image->picture); } TRACE("returning (%f, %f)\n", *height, *width); @@ -2285,8 +2215,6 @@ *height = units_to_pixels(((GpMetafile*)image)->bounds.Height, ((GpMetafile*)image)->unit, image->yres); else if(image->type == ImageTypeBitmap) *height = ((GpBitmap*)image)->height; - else - *height = ipicture_pixel_height(image->picture); TRACE("returning %d\n", *height); @@ -2385,8 +2313,6 @@ *width = units_to_pixels(((GpMetafile*)image)->bounds.Width, ((GpMetafile*)image)->unit, image->xres); else if(image->type == ImageTypeBitmap) *width = ((GpBitmap*)image)->width; - else - *width = ipicture_pixel_width(image->picture); TRACE("returning %d\n", *width); @@ -3965,32 +3891,118 @@ return decode_image_wic(stream, &GUID_ContainerFormatTiff, NULL, image); } -static GpStatus decode_image_olepicture_metafile(IStream* stream, GpImage **image) -{ - IPicture *pic; +static GpStatus load_wmf(IStream *stream, GpMetafile **metafile) +{ + GpStatus status = GenericError; + HRESULT hr; + UINT size; + LARGE_INTEGER pos; + WmfPlaceableFileHeader pfh; + BOOL is_placeable = FALSE; + METAHEADER mh; + HMETAFILE hmf; + void *buf; + + pos.QuadPart = 0; + IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + + hr = IStream_Read(stream, &mh, sizeof(mh), &size); + if (hr != S_OK || size != sizeof(mh)) + return GenericError; + + if (mh.mtType == 0xcdd7 && mh.mtHeaderSize == 0x9ac6) + { + is_placeable = TRUE; + + pos.QuadPart = 0; + IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + + hr = IStream_Read(stream, &pfh, sizeof(pfh), &size); + if (hr != S_OK || size != sizeof(pfh)) + return GenericError; + + hr = IStream_Read(stream, &mh, sizeof(mh), &size); + if (hr != S_OK || size != sizeof(mh)) + return GenericError; + } + + pos.QuadPart = is_placeable ? sizeof(pfh) : 0; + IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + + buf = heap_alloc(mh.mtSize * 2); + if (!buf) return OutOfMemory; + + hr = IStream_Read(stream, buf, mh.mtSize * 2, &size); + if (hr == S_OK && size == mh.mtSize * 2) + { + hmf = SetMetaFileBitsEx(mh.mtSize * 2, buf); + if (hmf) + { + status = GdipCreateMetafileFromWmf(hmf, TRUE, is_placeable ? &pfh : NULL, metafile); + if (status != Ok) + DeleteMetaFile(hmf); + } + } + + heap_free(buf); + return status; +} + +static GpStatus load_emf(IStream *stream, GpMetafile **metafile) +{ + GpStatus status = GenericError; + HRESULT hr; + UINT size; + LARGE_INTEGER pos; + ENHMETAHEADER emh; + HENHMETAFILE hemf; + void *buf; + + pos.QuadPart = 0; + IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + + hr = IStream_Read(stream, &emh, sizeof(emh), &size); + if (hr != S_OK || size != sizeof(emh) || emh.dSignature != ENHMETA_SIGNATURE) + return GenericError; + + pos.QuadPart = 0; + IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); + + buf = heap_alloc(emh.nBytes); + if (!buf) return OutOfMemory; + + hr = IStream_Read(stream, buf, emh.nBytes, &size); + if (hr == S_OK && size == emh.nBytes) + { + hemf = SetEnhMetaFileBits(emh.nBytes, buf); + if (hemf) + { + status = GdipCreateMetafileFromEmf(hemf, FALSE, metafile); + if (status != Ok) + DeleteEnhMetaFile(hemf); + } + } + + heap_free(buf); + return status; +} + +static GpStatus decode_image_metafile(IStream *stream, GpImage **image) +{ + GpMetafile *metafile; TRACE("%p %p\n", stream, image); if(!stream || !image) return InvalidParameter; - if(OleLoadPicture(stream, 0, FALSE, &IID_IPicture, - (LPVOID*) &pic) != S_OK){ - TRACE("Could not load picture\n"); + if (load_emf(stream, &metafile) != Ok && load_wmf(stream, &metafile) != Ok) + { + TRACE("Could not load metafile\n"); return GenericError; } - /* FIXME: missing initialization code */ - *image = heap_alloc_zero(sizeof(GpMetafile)); - if(!*image) return OutOfMemory; - (*image)->type = ImageTypeMetafile; - (*image)->decoder = NULL; - (*image)->picture = pic; - (*image)->flags = ImageFlagsNone; - (*image)->frame_count = 1; - (*image)->current_frame = 0; - (*image)->palette = NULL; - + *image = (GpImage *)metafile; TRACE("<-- %p\n", *image); return Ok; @@ -4648,7 +4660,7 @@ /* SigMask */ emf_sig_mask, }, NULL, - decode_image_olepicture_metafile, + decode_image_metafile, NULL }, { @@ -4668,7 +4680,7 @@ /* SigMask */ wmf_sig_mask, }, NULL, - decode_image_olepicture_metafile, + decode_image_metafile, NULL }, { Modified: trunk/reactos/dll/win32/gdiplus/metafile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/metafile…
============================================================================== --- trunk/reactos/dll/win32/gdiplus/metafile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdiplus/metafile.c [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -173,54 +173,55 @@ HDC record_dc; REAL dpix, dpiy; REAL framerect_factor_x, framerect_factor_y; - RECT rc; + RECT rc, *lprc; GpStatus stat; TRACE("(%p %d %p %d %p %p)\n", hdc, type, frameRect, frameUnit, desc, metafile); if (!hdc || type < EmfTypeEmfOnly || type > EmfTypeEmfPlusDual || !metafile) return InvalidParameter; - - if (!frameRect) - { - FIXME("not implemented for NULL rect\n"); - return NotImplemented; - } dpix = (REAL)GetDeviceCaps(hdc, HORZRES) / GetDeviceCaps(hdc, HORZSIZE) * 25.4; dpiy = (REAL)GetDeviceCaps(hdc, VERTRES) / GetDeviceCaps(hdc, VERTSIZE) * 25.4; - switch (frameUnit) - { - case MetafileFrameUnitPixel: - framerect_factor_x = 2540.0 / dpix; - framerect_factor_y = 2540.0 / dpiy; - break; - case MetafileFrameUnitPoint: - framerect_factor_x = framerect_factor_y = 2540.0 / 72.0; - break; - case MetafileFrameUnitInch: - framerect_factor_x = framerect_factor_y = 2540.0; - break; - case MetafileFrameUnitDocument: - framerect_factor_x = framerect_factor_y = 2540.0 / 300.0; - break; - case MetafileFrameUnitMillimeter: - framerect_factor_x = framerect_factor_y = 100.0; - break; - case MetafileFrameUnitGdi: - framerect_factor_x = framerect_factor_y = 1.0; - break; - default: - return InvalidParameter; - } - - rc.left = framerect_factor_x * frameRect->X; - rc.top = framerect_factor_y * frameRect->Y; - rc.right = rc.left + framerect_factor_x * frameRect->Width; - rc.bottom = rc.top + framerect_factor_y * frameRect->Height; - - record_dc = CreateEnhMetaFileW(hdc, NULL, &rc, desc); + if (frameRect) + { + switch (frameUnit) + { + case MetafileFrameUnitPixel: + framerect_factor_x = 2540.0 / dpix; + framerect_factor_y = 2540.0 / dpiy; + break; + case MetafileFrameUnitPoint: + framerect_factor_x = framerect_factor_y = 2540.0 / 72.0; + break; + case MetafileFrameUnitInch: + framerect_factor_x = framerect_factor_y = 2540.0; + break; + case MetafileFrameUnitDocument: + framerect_factor_x = framerect_factor_y = 2540.0 / 300.0; + break; + case MetafileFrameUnitMillimeter: + framerect_factor_x = framerect_factor_y = 100.0; + break; + case MetafileFrameUnitGdi: + framerect_factor_x = framerect_factor_y = 1.0; + break; + default: + return InvalidParameter; + } + + rc.left = framerect_factor_x * frameRect->X; + rc.top = framerect_factor_y * frameRect->Y; + rc.right = rc.left + framerect_factor_x * frameRect->Width; + rc.bottom = rc.top + framerect_factor_y * frameRect->Height; + + lprc = &rc; + } + else + lprc = NULL; + + record_dc = CreateEnhMetaFileW(hdc, NULL, lprc, desc); if (!record_dc) return GenericError; @@ -233,13 +234,13 @@ } (*metafile)->image.type = ImageTypeMetafile; - (*metafile)->image.picture = NULL; (*metafile)->image.flags = ImageFlagsNone; (*metafile)->image.palette = NULL; (*metafile)->image.xres = dpix; (*metafile)->image.yres = dpiy; - (*metafile)->bounds = *frameRect; - (*metafile)->unit = frameUnit; + (*metafile)->bounds.X = (*metafile)->bounds.Y = 0.0; + (*metafile)->bounds.Width = (*metafile)->bounds.Height = 1.0; + (*metafile)->unit = UnitPixel; (*metafile)->metafile_type = type; (*metafile)->record_dc = record_dc; (*metafile)->comment_data = NULL; @@ -282,6 +283,27 @@ pFrameRectF = NULL; return GdipRecordMetafile(hdc, type, pFrameRectF, frameUnit, desc, metafile); +} + +GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream *stream, HDC hdc, EmfType type, GDIPCONST GpRectF *frameRect, + MetafileFrameUnit frameUnit, GDIPCONST WCHAR *desc, GpMetafile **metafile) +{ + GpStatus stat; + + TRACE("(%p %p %d %p %d %p %p)\n", stream, hdc, type, frameRect, frameUnit, desc, metafile); + + if (!stream) + return InvalidParameter; + + stat = GdipRecordMetafile(hdc, type, frameRect, frameUnit, desc, metafile); + + if (stat == Ok) + { + (*metafile)->record_stream = stream; + IStream_AddRef(stream); + } + + return stat; } GpStatus METAFILE_GetGraphicsContext(GpMetafile* metafile, GpGraphics **result) @@ -448,6 +470,51 @@ heap_free(metafile->comment_data); metafile->comment_data = NULL; metafile->comment_data_size = 0; + + if (stat == Ok) + { + MetafileHeader header; + + stat = GdipGetMetafileHeaderFromEmf(metafile->hemf, &header); + if (stat == Ok) + { + metafile->bounds.X = header.X; + metafile->bounds.Y = header.Y; + metafile->bounds.Width = header.Width; + metafile->bounds.Height = header.Height; + } + } + + if (stat == Ok && metafile->record_stream) + { + BYTE *buffer; + UINT buffer_size; + + buffer_size = GetEnhMetaFileBits(metafile->hemf, 0, NULL); + + buffer = heap_alloc(buffer_size); + if (buffer) + { + HRESULT hr; + + GetEnhMetaFileBits(metafile->hemf, buffer_size, buffer); + + hr = IStream_Write(metafile->record_stream, buffer, buffer_size, NULL); + + if (FAILED(hr)) + stat = hresult_to_status(hr); + + heap_free(buffer); + } + else + stat = OutOfMemory; + } + + if (metafile->record_stream) + { + IStream_Release(metafile->record_stream); + metafile->record_stream = NULL; + } return stat; } @@ -868,17 +935,24 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile * metafile, MetafileHeader * header) { - static int calls; + GpStatus status; TRACE("(%p, %p)\n", metafile, header); if(!metafile || !header) return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); - - memset(header, 0, sizeof(MetafileHeader)); + if (!metafile->hemf) + return InvalidParameter; + + status = GdipGetMetafileHeaderFromEmf(metafile->hemf, header); + if (status != Ok) return status; + + header->Type = metafile->metafile_type; + header->DpiX = metafile->image.xres; + header->DpiY = metafile->image.yres; + header->Width = metafile->bounds.Width; + header->Height = metafile->bounds.Height; return Ok; } @@ -968,40 +1042,61 @@ return Ok; } +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromWmf(HMETAFILE hwmf, + GDIPCONST WmfPlaceableFileHeader *placeable, MetafileHeader *header) +{ + GpStatus status; + GpMetafile *metafile; + + TRACE("(%p,%p,%p)\n", hwmf, placeable, header); + + status = GdipCreateMetafileFromWmf(hwmf, FALSE, placeable, &metafile); + if (status == Ok) + { + status = GdipGetMetafileHeaderFromMetafile(metafile, header); + GdipDisposeImage(&metafile->image); + } + return status; +} + GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR *filename, MetafileHeader *header) { - static int calls; + GpStatus status; + GpMetafile *metafile; TRACE("(%s,%p)\n", debugstr_w(filename), header); - if(!filename || !header) - return InvalidParameter; - - if(!(calls++)) - FIXME("not implemented\n"); - - memset(header, 0, sizeof(MetafileHeader)); - - return Ok; + if (!filename || !header) + return InvalidParameter; + + status = GdipCreateMetafileFromFile(filename, &metafile); + if (status == Ok) + { + status = GdipGetMetafileHeaderFromMetafile(metafile, header); + GdipDisposeImage(&metafile->image); + } + return status; } GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream *stream, MetafileHeader *header) { - static int calls; + GpStatus status; + GpMetafile *metafile; TRACE("(%p,%p)\n", stream, header); - if(!stream || !header) - return InvalidParameter; - - if(!(calls++)) - FIXME("not implemented\n"); - - memset(header, 0, sizeof(MetafileHeader)); - - return Ok; + if (!stream || !header) + return InvalidParameter; + + status = GdipCreateMetafileFromStream(stream, &metafile); + if (status == Ok) + { + status = GdipGetMetafileHeaderFromMetafile(metafile, header); + GdipDisposeImage(&metafile->image); + } + return status; } GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete, @@ -1117,8 +1212,21 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream, GpMetafile **metafile) { - FIXME("(%p, %p): stub\n", stream, metafile); - return NotImplemented; + GpStatus stat; + + TRACE("%p %p\n", stream, metafile); + + stat = GdipLoadImageFromStream(stream, (GpImage **)metafile); + if (stat != Ok) return stat; + + if ((*metafile)->image.type != ImageTypeMetafile) + { + GdipDisposeImage(&(*metafile)->image); + *metafile = NULL; + return GenericError; + } + + return Ok; } GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile, Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 19:08:07 2016 @@ -68,7 +68,7 @@ reactos/dll/win32/faultrep # Synced to WineStaging-1.9.4 reactos/dll/win32/fltlib # Synced to WineStaging-1.9.4 reactos/dll/win32/fusion # Synced to WineStaging-1.9.4 -reactos/dll/win32/gdiplus # Synced to WineStaging-1.9.4 +reactos/dll/win32/gdiplus # Synced to WineStaging-1.9.11 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-1.9.4 reactos/dll/win32/hlink # Synced to WineStaging-1.9.4 reactos/dll/win32/hnetcfg # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
[akhaldi] 71545: [DBGHELP] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 19:05:55 2016 New Revision: 71545 URL:
http://svn.reactos.org/svn/reactos?rev=71545&view=rev
Log: [DBGHELP] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/dbghelp/crc32.c trunk/reactos/dll/win32/dbghelp/dbghelp.spec trunk/reactos/dll/win32/dbghelp/dbghelp_private.h trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff trunk/reactos/dll/win32/dbghelp/elf_module.c trunk/reactos/dll/win32/dbghelp/macho_module.c trunk/reactos/dll/win32/dbghelp/module.c trunk/reactos/dll/win32/dbghelp/msc.c trunk/reactos/dll/win32/dbghelp/pe_module.c trunk/reactos/dll/win32/dbghelp/rosstubs.c trunk/reactos/dll/win32/dbghelp/symbol.c trunk/reactos/dll/win32/dbghelp/type.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/dbghelp/crc32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/crc32.c?…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/crc32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/crc32.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -53,7 +53,7 @@ /* order from highest-order term to lowest-order term. UARTs transmit */ /* characters in order from LSB to MSB. By storing the CRC this way, */ /* we hand it to the UART in the order low-byte to high-byte; the UART */ -/* sends each low-bit to hight-bit; and the result is transmission bit */ +/* sends each low-bit to high-bit; and the result is transmission bit */ /* by bit from highest- to lowest-order term without requiring any bit */ /* shuffling on our part. Reception works similarly. */ Modified: trunk/reactos/dll/win32/dbghelp/dbghelp.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp.…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/dbghelp.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dbghelp.spec [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -7,8 +7,8 @@ @ stdcall EnumDirTreeW(long wstr wstr ptr ptr ptr) @ stdcall EnumerateLoadedModules(long ptr ptr) @ stdcall EnumerateLoadedModules64(long ptr ptr) -@ stdcall EnumerateLoadedModulesEx(ptr ptr ptr) -@ stdcall EnumerateLoadedModulesExW(ptr ptr ptr) +@ stdcall EnumerateLoadedModulesEx(long ptr ptr) EnumerateLoadedModules64 +@ stdcall EnumerateLoadedModulesExW(long ptr ptr) EnumerateLoadedModulesW64 @ stdcall EnumerateLoadedModulesW64(long ptr ptr) @ stdcall ExtensionApiVersion() @ stdcall FindDebugInfoFile(str str ptr) Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/dbghelp_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dbghelp_private.h [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -150,9 +150,6 @@ void hash_table_iter_init(const struct hash_table* ht, struct hash_table_iter* hti, const char* name) DECLSPEC_HIDDEN; void* hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN; - -#define GET_ENTRY(__i, __t, __f) \ - ((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f))) extern unsigned dbghelp_options DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -1,7 +1,7 @@ diff -pudN e:\wine\dlls\dbghelp/cpu_i386.c e:\reactos\dll\win32\dbghelp/cpu_i386.c ---- e:\wine\dlls\dbghelp/cpu_i386.c 2015-07-14 15:44:34.399098500 +0100 -+++ e:\reactos\dll\win32\dbghelp/cpu_i386.c 2015-07-19 09:09:09.912044200 +0100 -@@ -33,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); +--- e:\wine\dlls\dbghelp/cpu_i386.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/cpu_i386.c 2015-11-21 10:14:57 +0100 +@@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); #define IS_VM86_MODE(ctx) (ctx->EFlags & V86_FLAG) @@ -10,7 +10,7 @@ static ADDRESS_MODE get_selector_type(HANDLE hThread, const CONTEXT* ctx, WORD sel) { LDT_ENTRY le; -@@ -72,6 +69,7 @@ static BOOL i386_build_addr(HANDLE hThre +@@ -69,6 +69,7 @@ static BOOL i386_build_addr(HANDLE hThre } #endif @@ -18,7 +18,7 @@ static BOOL i386_get_addr(HANDLE hThread, const CONTEXT* ctx, enum cpu_addr ca, ADDRESS64* addr) { -@@ -85,8 +83,9 @@ static BOOL i386_get_addr(HANDLE hThread +@@ -82,8 +83,9 @@ static BOOL i386_get_addr(HANDLE hThread #endif return FALSE; } @@ -29,7 +29,7 @@ /* fetch_next_frame32() * * modify (at least) context.{eip, esp, ebp} using unwind information -@@ -109,7 +108,9 @@ static BOOL fetch_next_frame32(struct cp +@@ -106,7 +108,9 @@ static BOOL fetch_next_frame32(struct cp cpair[2].name = "$eip"; cpair[2].pvalue = &context->Eip; cpair[3].name = NULL; cpair[3].pvalue = NULL; @@ -39,7 +39,7 @@ { /* do a simple unwind using ebp * we assume a "regular" prologue in the function has been used -@@ -147,6 +148,7 @@ enum st_mode {stm_start, stm_32bit, stm_ +@@ -144,6 +148,7 @@ enum st_mode {stm_start, stm_32bit, stm_ #define set_curr_mode(m) {frame->Reserved[__CurrentModeCount] &= ~0x0F; frame->Reserved[__CurrentModeCount] |= (m & 0x0F);} #define inc_curr_count() (frame->Reserved[__CurrentModeCount] += 0x10) @@ -47,7 +47,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CONTEXT* context) { STACK32FRAME frame32; -@@ -512,6 +514,7 @@ done_err: +@@ -509,6 +514,7 @@ done_err: set_curr_mode(stm_done); return FALSE; } @@ -55,7 +55,7 @@ static unsigned i386_map_dwarf_register(unsigned regno, BOOL eh_frame) { -@@ -670,6 +673,7 @@ static const char* i386_fetch_regname(un +@@ -667,6 +673,7 @@ static const char* i386_fetch_regname(un return NULL; } @@ -63,7 +63,7 @@ static BOOL i386_fetch_minidump_thread(struct dump_context* dc, unsigned index, unsigned flags, const CONTEXT* ctx) { if (ctx->ContextFlags && (flags & ThreadWriteInstructionWindow)) -@@ -683,6 +687,7 @@ static BOOL i386_fetch_minidump_thread(s +@@ -680,6 +687,7 @@ static BOOL i386_fetch_minidump_thread(s return TRUE; } @@ -71,7 +71,7 @@ static BOOL i386_fetch_minidump_module(struct dump_context* dc, unsigned index, unsigned flags) { -@@ -696,12 +701,22 @@ DECLSPEC_HIDDEN struct cpu cpu_i386 = { +@@ -693,12 +701,22 @@ DECLSPEC_HIDDEN struct cpu cpu_i386 = { IMAGE_FILE_MACHINE_I386, 4, CV_REG_EBP, @@ -95,9 +95,9 @@ +#endif }; diff -pudN e:\wine\dlls\dbghelp/cpu_x86_64.c e:\reactos\dll\win32\dbghelp/cpu_x86_64.c ---- e:\wine\dlls\dbghelp/cpu_x86_64.c 2015-07-14 15:44:34.403098700 +0100 -+++ e:\reactos\dll\win32\dbghelp/cpu_x86_64.c 2015-07-19 08:56:08.508350500 +0100 -@@ -288,10 +280,10 @@ static BOOL is_inside_epilog(struct cpu_ +--- e:\wine\dlls\dbghelp/cpu_x86_64.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/cpu_x86_64.c 2015-08-27 22:02:13 +0100 +@@ -280,10 +280,10 @@ static BOOL is_inside_epilog(struct cpu_ if ((op0 & 0xf8) == 0x48) { if (!sw_read_mem(csw, pc + 1, &op1, 1)) return FALSE; @@ -109,7 +109,7 @@ if (op0 == 0x48 && op2 == 0xc4) { pc += 7; -@@ -299,7 +291,6 @@ static BOOL is_inside_epilog(struct cpu_ +@@ -291,7 +291,6 @@ static BOOL is_inside_epilog(struct cpu_ } return FALSE; case 0x83: /* add $n,%rsp */ @@ -117,7 +117,7 @@ if (op0 == 0x48 && op2 == 0xc4) { pc += 4; -@@ -307,7 +298,6 @@ static BOOL is_inside_epilog(struct cpu_ +@@ -299,7 +298,6 @@ static BOOL is_inside_epilog(struct cpu_ } return FALSE; case 0x8d: /* lea n(reg),%rsp */ @@ -126,9 +126,9 @@ if (((op2 >> 3) & 7) != 4) return FALSE; /* dest reg mus be %rsp */ if ((op2 & 7) == 4) return FALSE; /* no SIB byte allowed */ diff -pudN e:\wine\dlls\dbghelp/dbghelp.c e:\reactos\dll\win32\dbghelp/dbghelp.c ---- e:\wine\dlls\dbghelp/dbghelp.c 2015-02-21 17:13:08.781542200 +0100 -+++ e:\reactos\dll\win32\dbghelp/dbghelp.c 2014-04-06 13:39:18.629374300 +0100 -@@ -114,6 +109,7 @@ void* fetch_buffer(struct process* pcs, +--- e:\wine\dlls\dbghelp/dbghelp.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/dbghelp.c 2015-11-21 10:14:57 +0100 +@@ -109,6 +109,7 @@ void* fetch_buffer(struct process* pcs, return pcs->buffer; } @@ -136,7 +136,7 @@ const char* wine_dbgstr_addr(const ADDRESS64* addr) { if (!addr) return "(null)"; -@@ -131,12 +127,18 @@ const char* wine_dbgstr_addr(const ADDRE +@@ -126,12 +127,18 @@ const char* wine_dbgstr_addr(const ADDRE return "unknown"; } } @@ -156,7 +156,7 @@ &cpu_i386 #elif defined(__x86_64__) &cpu_x86_64 -@@ -261,8 +263,10 @@ static BOOL check_live_target(struct pro +@@ -256,8 +263,10 @@ static BOOL check_live_target(struct pro { if (!GetProcessId(pcs->handle)) return FALSE; if (GetEnvironmentVariableA("DBGHELP_NOLIVE", NULL, 0)) return FALSE; @@ -167,7 +167,7 @@ return TRUE; } -@@ -351,7 +355,8 @@ BOOL WINAPI SymInitializeW(HANDLE hProce +@@ -346,7 +355,8 @@ BOOL WINAPI SymInitializeW(HANDLE hProce pcs->dbg_hdr_addr = 0; pcs->next = process_first; process_first = pcs; @@ -177,7 +177,7 @@ if (check_live_target(pcs)) { if (fInvadeProcess) -@@ -365,6 +370,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProce +@@ -360,6 +370,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProce SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } @@ -186,9 +186,9 @@ return TRUE; } diff -pudN e:\wine\dlls\dbghelp/dbghelp_private.h e:\reactos\dll\win32\dbghelp/dbghelp_private.h ---- e:\wine\dlls\dbghelp/dbghelp_private.h 2015-07-14 15:44:34.411099200 +0100 -+++ e:\reactos\dll\win32\dbghelp/dbghelp_private.h 2015-07-19 08:57:09.675849100 +0100 -@@ -352,6 +391,15 @@ struct module_format +--- e:\wine\dlls\dbghelp/dbghelp_private.h 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/dbghelp_private.h 2016-06-05 20:02:44 +0100 +@@ -388,6 +388,15 @@ struct module_format } u; }; @@ -204,7 +204,7 @@ extern const struct wine_rb_functions source_rb_functions DECLSPEC_HIDDEN; struct module { -@@ -376,6 +424,9 @@ struct module +@@ -412,6 +421,9 @@ struct module unsigned sorttab_size; struct symt_ht** addr_sorttab; struct hash_table ht_symbols; @@ -214,7 +214,7 @@ /* types */ struct hash_table ht_types; -@@ -667,7 +718,9 @@ extern BOOL dwarf2_virtual_unwin +@@ -703,7 +715,9 @@ extern BOOL dwarf2_virtual_unwin CONTEXT* context, ULONG_PTR* cfa) DECLSPEC_HIDDEN; /* stack.c */ @@ -224,18 +224,10 @@ extern DWORD64 sw_xlat_addr(struct cpu_stack_walk* csw, ADDRESS64* addr) DECLSPEC_HIDDEN; extern void* sw_table_access(struct cpu_stack_walk* csw, DWORD64 addr) DECLSPEC_HIDDEN; extern DWORD64 sw_module_base(struct cpu_stack_walk* csw, DWORD64 addr) DECLSPEC_HIDDEN; -@@ -788,3 +841,7 @@ extern struct symt_pointer* - extern struct symt_typedef* - symt_new_typedef(struct module* module, struct symt* ref, - const char* name) DECLSPEC_HIDDEN; -+ -+#include "image_private.h" -+ -+#endif /* _DBGHELP_PRIVATE_H_ */ diff -pudN e:\wine\dlls\dbghelp/dwarf.c e:\reactos\dll\win32\dbghelp/dwarf.c ---- e:\wine\dlls\dbghelp/dwarf.c 2015-07-14 15:44:34.417099500 +0100 -+++ e:\reactos\dll\win32\dbghelp/dwarf.c 2015-07-19 08:58:24.024101500 +0100 -@@ -1930,8 +1898,10 @@ static struct symt* dwarf2_parse_subprog +--- e:\wine\dlls\dbghelp/dwarf.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/dwarf.c 2015-11-21 10:14:57 +0100 +@@ -1901,8 +1901,10 @@ static struct symt* dwarf2_parse_subprog * (not the case for stabs), we just drop Wine's thunks here... * Actual thunks will be created in elf_module from the symbol table */ @@ -246,7 +238,7 @@ if (!(ret_type = dwarf2_lookup_type(ctx, di))) { ret_type = ctx->symt_cache[sc_void]; -@@ -2446,7 +2416,17 @@ static BOOL dwarf2_parse_compilation_uni +@@ -2420,7 +2422,17 @@ static BOOL dwarf2_parse_compilation_uni } if (dwarf2_find_attribute(&ctx, di, DW_AT_stmt_list, &stmt_list)) { @@ -265,9 +257,9 @@ } ret = TRUE; diff -pudN e:\wine\dlls\dbghelp/dwarf.h e:\reactos\dll\win32\dbghelp/dwarf.h ---- e:\wine\dlls\dbghelp/dwarf.h 2015-02-21 17:13:08.785542200 +0100 -+++ e:\reactos\dll\win32\dbghelp/dwarf.h 2014-03-05 11:46:23.713943000 +0100 -@@ -554,3 +556,15 @@ enum dwarf_call_frame_info +--- e:\wine\dlls\dbghelp/dwarf.h 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/dwarf.h 2014-03-05 11:46:24 +0100 +@@ -556,3 +556,15 @@ enum dwarf_call_frame_info #define DW_INL_inlined 0x01 #define DW_INL_declared_not_inlined 0x02 #define DW_INL_declared_inlined 0x03 @@ -284,9 +276,9 @@ +} +#endif diff -pudN e:\wine\dlls\dbghelp/image_private.h e:\reactos\dll\win32\dbghelp/image_private.h ---- e:\wine\dlls\dbghelp/image_private.h 2015-07-14 15:44:34.418099600 +0100 -+++ e:\reactos\dll\win32\dbghelp/image_private.h 2015-07-19 09:00:19.387700000 +0100 -@@ -56,7 +58,7 @@ typedef struct section mach +--- e:\wine\dlls\dbghelp/image_private.h 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/image_private.h 2015-11-21 10:14:57 +0100 +@@ -58,7 +58,7 @@ typedef struct section mach #define IMAGE_NO_MAP ((void*)-1) @@ -295,7 +287,7 @@ #ifdef _WIN64 #define Elf_Ehdr Elf64_Ehdr -@@ -96,7 +98,7 @@ struct image_file_map +@@ -98,7 +98,7 @@ struct image_file_map const char* shstrtab; struct image_file_map* alternate; /* another ELF file (linked to this one) */ char* target_copy; @@ -304,7 +296,7 @@ Elf_Ehdr elfhdr; struct { -@@ -177,8 +179,10 @@ static inline BOOL image_find_section(st +@@ -180,8 +180,10 @@ static inline BOOL image_find_section(st { switch (fmap->modtype) { @@ -315,7 +307,7 @@ case DMT_PE: return pe_find_section(fmap, name, ism); default: assert(0); return FALSE; } -@@ -189,8 +193,10 @@ static inline const char* image_map_sect +@@ -192,8 +194,10 @@ static inline const char* image_map_sect if (!ism->fmap) return NULL; switch (ism->fmap->modtype) { @@ -326,7 +318,7 @@ case DMT_PE: return pe_map_section(ism); default: assert(0); return NULL; } -@@ -201,8 +207,10 @@ static inline void image_unmap_section(s +@@ -204,8 +208,10 @@ static inline void image_unmap_section(s if (!ism->fmap) return; switch (ism->fmap->modtype) { @@ -337,7 +329,7 @@ case DMT_PE: pe_unmap_section(ism); break; default: assert(0); return; } -@@ -213,8 +221,10 @@ static inline DWORD_PTR image_get_map_rv +@@ -216,8 +222,10 @@ static inline DWORD_PTR image_get_map_rv if (!ism->fmap) return 0; switch (ism->fmap->modtype) { @@ -348,7 +340,7 @@ case DMT_PE: return pe_get_map_rva(ism); default: assert(0); return 0; } -@@ -225,8 +235,10 @@ static inline unsigned image_get_map_siz +@@ -228,8 +236,10 @@ static inline unsigned image_get_map_siz if (!ism->fmap) return 0; switch (ism->fmap->modtype) { @@ -360,9 +352,9 @@ default: assert(0); return 0; } diff -pudN e:\wine\dlls\dbghelp/module.c e:\reactos\dll\win32\dbghelp/module.c ---- e:\wine\dlls\dbghelp/module.c 2015-07-14 15:44:34.423099800 +0100 -+++ e:\reactos\dll\win32\dbghelp/module.c 2015-07-19 09:04:12.643041400 +0100 -@@ -220,6 +213,9 @@ struct module* module_new(struct process +--- e:\wine\dlls\dbghelp/module.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/module.c 2016-06-05 20:02:44 +0100 +@@ -211,6 +211,9 @@ struct module* module_new(struct process */ hash_table_init(&module->pool, &module->ht_symbols, 4096); hash_table_init(&module->pool, &module->ht_types, 4096); @@ -372,7 +364,7 @@ vector_init(&module->vtypes, sizeof(struct symt*), 32); module->sources_used = 0; -@@ -346,9 +342,11 @@ BOOL module_get_debug(struct module_pair +@@ -337,9 +340,11 @@ BOOL module_get_debug(struct module_pair if (pair->effective->is_virtual) ret = FALSE; else switch (pair->effective->type) { @@ -384,7 +376,7 @@ case DMT_PE: idslW64.SizeOfStruct = sizeof(idslW64); idslW64.BaseOfImage = pair->effective->module.BaseOfImage; -@@ -365,9 +363,11 @@ BOOL module_get_debug(struct module_pair +@@ -356,9 +361,11 @@ BOOL module_get_debug(struct module_pair ret ? CBA_DEFERRED_SYMBOL_LOAD_COMPLETE : CBA_DEFERRED_SYMBOL_LOAD_FAILURE, &idslW64); break; @@ -396,7 +388,7 @@ default: ret = FALSE; break; -@@ -517,11 +517,13 @@ enum module_type module_get_type_by_name +@@ -497,11 +504,13 @@ enum module_type module_get_type_by_name /****************************************************************** * refresh_module_list */ @@ -410,7 +402,7 @@ /*********************************************************************** * SymLoadModule (DBGHELP.@) -@@ -605,7 +607,9 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -585,7 +594,9 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE if (Flags & ~(SLMFLAG_VIRTUAL)) FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName)); @@ -420,7 +412,7 @@ /* this is a Wine extension to the API just to redo the synchronisation */ if (!wImageName && !hFile) return 0; -@@ -629,6 +633,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -609,6 +620,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE wImageName) { /* and finally an ELF or Mach-O module */ @@ -428,7 +420,7 @@ switch (module_get_type_by_name(wImageName)) { case DMT_ELF: -@@ -641,6 +646,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE +@@ -621,6 +633,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE /* Ignored */ break; } @@ -436,7 +428,7 @@ } } if (!module) -@@ -830,6 +836,7 @@ BOOL WINAPI SymEnumerateModulesW64(HAND +@@ -810,6 +823,7 @@ BOOL WINAPI SymEnumerateModulesW64(HAND return TRUE; } @@ -444,15 +436,16 @@ /****************************************************************** * EnumerateLoadedModules64 (DBGHELP.@) * -@@ -930,6 +937,7 @@ BOOL WINAPI EnumerateLoadedModulesW64(H - +@@ -911,6 +925,8 @@ BOOL WINAPI EnumerateLoadedModulesW64(H return sz != 0 && i == sz; } + +#endif /* DBGHELP_STATIC_LIB */ - ++ /****************************************************************** * SymGetModuleInfo (DBGHELP.@) -@@ -1142,7 +1150,11 @@ BOOL WINAPI SymRefreshModuleList(HANDLE + * +@@ -1122,7 +1138,11 @@ BOOL WINAPI SymRefreshModuleList(HANDLE if (!(pcs = process_find_by_handle(hProcess))) return FALSE; @@ -465,9 +458,9 @@ /*********************************************************************** diff -pudN e:\wine\dlls\dbghelp/pe_module.c e:\reactos\dll\win32\dbghelp/pe_module.c ---- e:\wine\dlls\dbghelp/pe_module.c 2015-03-21 14:04:47.631809000 +0100 -+++ e:\reactos\dll\win32\dbghelp/pe_module.c 2015-07-19 09:04:59.065696600 +0100 -@@ -516,6 +505,7 @@ static BOOL pe_load_dwarf(struct module* +--- e:\wine\dlls\dbghelp/pe_module.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/pe_module.c 2016-06-05 20:02:44 +0100 +@@ -505,6 +505,7 @@ static BOOL pe_load_dwarf(struct module* return ret; } @@ -475,7 +468,7 @@ /****************************************************************** * pe_load_dbg_file * -@@ -615,6 +605,7 @@ done: +@@ -604,6 +605,7 @@ done: pe_unmap_full(fmap); return ret; } @@ -483,7 +476,7 @@ /*********************************************************************** * pe_load_export_debug_info -@@ -711,7 +702,9 @@ BOOL pe_load_debug_info(const struct pro +@@ -700,7 +702,9 @@ BOOL pe_load_debug_info(const struct pro { ret = pe_load_stabs(pcs, module); ret = pe_load_dwarf(module) || ret; @@ -493,10 +486,24 @@ ret = ret || pe_load_coff_symbol_table(module); /* FIXME */ /* if we still have no debug info (we could only get SymExport at this * point), then do the SymExport except if we have an ELF container, +diff -pudN e:\wine\dlls\dbghelp/stabs.c e:\reactos\dll\win32\dbghelp/stabs.c +--- e:\wine\dlls\dbghelp/stabs.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/stabs.c 2015-08-27 22:02:13 +0100 +@@ -37,6 +37,10 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); + ++#ifndef DBGHELP_STATIC_LIB ++#define strtoull _strtoui64 ++#endif ++ + /* Masks for n_type field */ + #ifndef N_STAB + #define N_STAB 0xe0 diff -pudN e:\wine\dlls\dbghelp/symbol.c e:\reactos\dll\win32\dbghelp/symbol.c ---- e:\wine\dlls\dbghelp/symbol.c 2015-03-21 14:04:47.632809700 +0100 -+++ e:\reactos\dll\win32\dbghelp/symbol.c 2014-09-14 18:44:28.955907600 +0100 -@@ -66,18 +53,39 @@ int symt_cmp_addr(const void* p1, const +--- e:\wine\dlls\dbghelp/symbol.c 2016-05-31 18:01:33 +0100 ++++ e:\reactos\dll\win32\dbghelp/symbol.c 2016-06-05 20:02:44 +0100 +@@ -53,18 +53,39 @@ int symt_cmp_addr(const void* p1, const DWORD symt_ptr2index(struct module* module, const struct symt* sym) { @@ -543,7 +550,7 @@ if (c) *c = sym; return len + 1; #else -@@ -87,7 +95,7 @@ DWORD symt_ptr2index(struct +@@ -74,7 +95,7 @@ DWORD symt_ptr2index(struct struct symt* symt_index2ptr(struct module* module, DWORD id) { @@ -552,3 +559,20 @@ if (!id-- || id >= vector_length(&module->vsymt)) return NULL; return *(struct symt**)vector_at(&module->vsymt, id); #else +diff -pudN e:\wine\dlls\dbghelp/version.rc e:\reactos\dll\win32\dbghelp/version.rc +--- e:\wine\dlls\dbghelp/version.rc 2015-11-15 19:23:04 +0100 ++++ e:\reactos\dll\win32\dbghelp/version.rc 2012-02-23 01:07:59 +0100 +@@ -18,9 +18,9 @@ + + #define WINE_FILEDESCRIPTION_STR "Wine Image Helper" + #define WINE_FILENAME_STR "dbghelp.dll" +-#define WINE_FILEVERSION 6,1,7601,17514 +-#define WINE_FILEVERSION_STR "6.1.7601.17514" +-#define WINE_PRODUCTVERSION 6,1,7601,17514 +-#define WINE_PRODUCTVERSION_STR "6.1.7601.17514" ++#define WINE_FILEVERSION 5,1,2600,3264 ++#define WINE_FILEVERSION_STR "5.1.2600.3264" ++#define WINE_PRODUCTVERSION 5,1,2600,3264 ++#define WINE_PRODUCTVERSION_STR "5.1.2600.3264" + + #include "wine/wine_common_ver.rc" Modified: trunk/reactos/dll/win32/dbghelp/elf_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/elf_modu…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/elf_module.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/elf_module.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -642,7 +642,7 @@ hash_table_iter_init(&module->ht_symbols, &hti, NULL); while ((ptr = hash_table_iter_up(&hti))) { - sym = GET_ENTRY(ptr, struct symt_ht, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); switch (sym->symt.tag) { case SymTagFunction: Modified: trunk/reactos/dll/win32/dbghelp/macho_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/macho_mo…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/macho_module.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/macho_module.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -894,7 +894,7 @@ hash_table_iter_init(&module->ht_symbols, &hti_modules, ste->ht_elt.name); while ((ptr = hash_table_iter_up(&hti_modules))) { - sym = GET_ENTRY(ptr, struct symt_ht, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); if (strcmp(sym->hash_elt.name, ste->ht_elt.name)) continue; Modified: trunk/reactos/dll/win32/dbghelp/module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/module.c…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/module.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -924,6 +924,7 @@ return sz != 0 && i == sz; } + #endif /* DBGHELP_STATIC_LIB */ /****************************************************************** Modified: trunk/reactos/dll/win32/dbghelp/msc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/msc.c?re…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/msc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/msc.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -1005,7 +1005,7 @@ hash_table_iter_init(&ctp->module->ht_types, &hti, name); while ((ptr = hash_table_iter_up(&hti))) { - type = GET_ENTRY(ptr, struct symt_ht, hash_elt); + type = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); if (type->symt.tag == SymTagUDT && type->hash_elt.name && !strcmp(type->hash_elt.name, name)) @@ -2962,9 +2962,9 @@ hash_table_iter_init(&pev->values, &hti, str); while ((ptr = hash_table_iter_up(&hti))) { - if (!strcmp(GET_ENTRY(ptr, struct zvalue, elt)->elt.name, str)) - { - *val = GET_ENTRY(ptr, struct zvalue, elt)->value; + if (!strcmp(CONTAINING_RECORD(ptr, struct zvalue, elt)->elt.name, str)) + { + *val = CONTAINING_RECORD(ptr, struct zvalue, elt)->value; return TRUE; } } @@ -3017,9 +3017,9 @@ hash_table_iter_init(&pev->values, &hti, name); while ((ptr = hash_table_iter_up(&hti))) { - if (!strcmp(GET_ENTRY(ptr, struct zvalue, elt)->elt.name, name)) - { - GET_ENTRY(ptr, struct zvalue, elt)->value = val; + if (!strcmp(CONTAINING_RECORD(ptr, struct zvalue, elt)->elt.name, name)) + { + CONTAINING_RECORD(ptr, struct zvalue, elt)->value = val; break; } } Modified: trunk/reactos/dll/win32/dbghelp/pe_module.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/pe_modul…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/pe_module.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/pe_module.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -358,7 +358,7 @@ hash_table_iter_init(&module->ht_symbols, &hti, name); while ((ptr = hash_table_iter_up(&hti))) { - sym = GET_ENTRY(ptr, struct symt_data, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_data, hash_elt); if (sym->symt.tag == SymTagData && (sym->kind == DataIsGlobal || sym->kind == DataIsFileStatic) && sym->u.var.kind == loc_absolute && Modified: trunk/reactos/dll/win32/dbghelp/rosstubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/rosstubs…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/rosstubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/rosstubs.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -38,17 +38,6 @@ return FALSE; } -BOOL -IMAGEAPI -EnumerateLoadedModulesExW( - IN HANDLE hProcess, - IN PENUMLOADED_MODULES_CALLBACKW64 EnumLoadedModulesCallback, - IN PVOID UserContext OPTIONAL) -{ - UNIMPLEMENTED; - return FALSE; -} - BOOL WINAPI DbgHelpCreateUserDump(LPSTR pszFileName, PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback, Modified: trunk/reactos/dll/win32/dbghelp/symbol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/symbol.c…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/symbol.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -430,7 +430,7 @@ if (pc) block->size = func->address + pc - block->address; return (block->container->tag == SymTagBlock) ? - GET_ENTRY(block->container, struct symt_block, symt) : NULL; + CONTAINING_RECORD(block->container, struct symt_block, symt) : NULL; } struct symt_hierarchy_point* symt_add_function_point(struct module* module, @@ -749,7 +749,7 @@ hash_table_iter_init(&pair->effective->ht_symbols, &hti, NULL); while ((ptr = hash_table_iter_up(&hti))) { - sym = GET_ENTRY(ptr, struct symt_ht, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); nameW = symt_get_nameW(&sym->symt); ret = SymMatchStringW(nameW, match, FALSE); HeapFree(GetProcessHeap(), 0, nameW); @@ -1337,7 +1337,7 @@ hash_table_iter_init(&pair.effective->ht_symbols, &hti, name); while ((ptr = hash_table_iter_up(&hti))) { - sym = GET_ENTRY(ptr, struct symt_ht, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); if (!strcmp(sym->hash_elt.name, name)) { @@ -2156,7 +2156,7 @@ { unsigned int i; - sym = GET_ENTRY(ptr, struct symt_ht, hash_elt); + sym = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); if (sym->symt.tag != SymTagFunction) continue; sci.FileName[0] = '\0'; Modified: trunk/reactos/dll/win32/dbghelp/type.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/type.c?r…
============================================================================== --- trunk/reactos/dll/win32/dbghelp/type.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/type.c [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -159,7 +159,7 @@ hash_table_iter_init(&module->ht_types, &hti, typename); while ((ptr = hash_table_iter_up(&hti))) { - type = GET_ENTRY(ptr, struct symt_ht, hash_elt); + type = CONTAINING_RECORD(ptr, struct symt_ht, hash_elt); if ((sym_tag == SymTagNull || type->symt.tag == sym_tag) && type->hash_elt.name && !strcmp(type->hash_elt.name, typename)) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 19:05:55 2016 @@ -63,7 +63,7 @@ reactos/dll/win32/cryptdll # Synced to WineStaging-1.9.4 reactos/dll/win32/cryptnet # Synced to WineStaging-1.9.4 reactos/dll/win32/cryptui # Synced to WineStaging-1.9.4 -reactos/dll/win32/dbghelp # Synced to WineStaging-1.9.4 +reactos/dll/win32/dbghelp # Synced to WineStaging-1.9.11 reactos/dll/win32/dciman32 # Synced to WineStaging-1.9.4 reactos/dll/win32/faultrep # Synced to WineStaging-1.9.4 reactos/dll/win32/fltlib # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
[akhaldi] 71544: [CRYPT32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 19:01:41 2016 New Revision: 71544 URL:
http://svn.reactos.org/svn/reactos?rev=71544&view=rev
Log: [CRYPT32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/rostests/winetests/crypt32/chain.c Modified: trunk/rostests/winetests/crypt32/chain.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/chain.c…
============================================================================== --- trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] Sun Jun 5 19:01:41 2016 @@ -125,8 +125,10 @@ CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, selfSignedCert, sizeof(selfSignedCert), CERT_STORE_ADD_ALWAYS, NULL); ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); + /* ERROR_FILE_NOT_FOUND used in Windows 10 */ + ok(!ret && ((GetLastError() == CRYPT_E_NOT_FOUND) || + (GetLastError() == ERROR_FILE_NOT_FOUND)), + "Expected CRYPT_E_NOT_FOUND or ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); CertCloseStore(store, 0); } @@ -4668,7 +4670,7 @@ CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL, fooPolicyCheckWithoutMatchingName, &oct2007, &policyPara); /* The
Battle.Net
chain checks a certificate with a domain component - * containg a terminating NULL. + * containing a terminating NULL. */ sslPolicyPara.pwszServerName = battle_dot_net; CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
8 years, 5 months
1
0
0
0
[akhaldi] 71543: [CRYPT32] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 19:00:43 2016 New Revision: 71543 URL:
http://svn.reactos.org/svn/reactos?rev=71543&view=rev
Log: [CRYPT32] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/crypt32/collectionstore.c trunk/reactos/dll/win32/crypt32/crypt32.spec trunk/reactos/dll/win32/crypt32/msg.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/crypt32/collectionstore.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/collecti…
============================================================================== --- trunk/reactos/dll/win32/crypt32/collectionstore.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/collectionstore.c [iso-8859-1] Sun Jun 5 19:00:43 2016 @@ -520,7 +520,6 @@ entry->store = sibling; entry->dwUpdateFlags = dwUpdateFlags; entry->dwPriority = dwPriority; - list_init(&entry->entry); TRACE("%p: adding %p, priority %d\n", collection, entry, dwPriority); EnterCriticalSection(&collection->cs); if (dwPriority) Modified: trunk/reactos/dll/win32/crypt32/crypt32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32.spec [iso-8859-1] Sun Jun 5 19:00:43 2016 @@ -160,7 +160,7 @@ @ stdcall CryptMsgOpenToEncode(long long long ptr str ptr) @ stdcall CryptMsgSignCTL(long ptr long ptr long ptr ptr) @ stdcall CryptMsgUpdate(ptr ptr long long) -@ stub CryptMsgVerifyCountersignatureEncoded +@ stdcall CryptMsgVerifyCountersignatureEncoded(ptr long ptr long ptr long ptr) @ stdcall CryptMsgVerifyCountersignatureEncodedEx(ptr long ptr long ptr long long ptr long ptr) @ stdcall CryptProtectData(ptr wstr ptr ptr ptr long ptr) @ stdcall CryptProtectMemory(ptr long long) Modified: trunk/reactos/dll/win32/crypt32/msg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/msg.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] Sun Jun 5 19:00:43 2016 @@ -3725,6 +3725,17 @@ return ret; } +BOOL WINAPI CryptMsgVerifyCountersignatureEncoded(HCRYPTPROV_LEGACY hCryptProv, + DWORD dwEncodingType, BYTE *pbSignerInfo, DWORD cbSignerInfo, + PBYTE pbSignerInfoCountersignature, DWORD cbSignerInfoCountersignature, + CERT_INFO *pciCountersigner) +{ + FIXME("(%08lx, %08x, %p, %d, %p, %d, %p): stub\n", hCryptProv, + dwEncodingType, pbSignerInfo, cbSignerInfo, pbSignerInfoCountersignature, + cbSignerInfoCountersignature, pciCountersigner); + return FALSE; +} + BOOL WINAPI CryptMsgVerifyCountersignatureEncodedEx(HCRYPTPROV_LEGACY hCryptProv, DWORD dwEncodingType, PBYTE pbSignerInfo, DWORD cbSignerInfo, PBYTE pbSignerInfoCountersignature, DWORD cbSignerInfoCountersignature, Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 19:00:43 2016 @@ -58,7 +58,7 @@ reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.11 reactos/dll/win32/compstui # Synced to WineStaging-1.9.4 reactos/dll/win32/credui # Synced to WineStaging-1.9.4 -reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.4 +reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.11 reactos/dll/win32/cryptdlg # Synced to WineStaging-1.9.4 reactos/dll/win32/cryptdll # Synced to WineStaging-1.9.4 reactos/dll/win32/cryptnet # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
[akhaldi] 71542: [COMDLG32] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 18:59:07 2016 New Revision: 71542 URL:
http://svn.reactos.org/svn/reactos?rev=71542&view=rev
Log: [COMDLG32] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c trunk/reactos/dll/win32/comdlg32/fontdlg.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg…
============================================================================== --- trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comdlg32/filedlg.c [iso-8859-1] Sun Jun 5 18:59:07 2016 @@ -434,6 +434,13 @@ ret = FALSE; } + /* set the lpstrFileTitle */ + if (ret && ofn->lpstrFile && ofn->lpstrFileTitle) + { + LPSTR lpstrFileTitle = PathFindFileNameA(ofn->lpstrFile); + lstrcpynA(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle); + } + if (lpstrSavDir) { SetCurrentDirectoryA(lpstrSavDir); @@ -524,6 +531,13 @@ break; default : ret = FALSE; + } + + /* set the lpstrFileTitle */ + if (ret && ofn->lpstrFile && ofn->lpstrFileTitle) + { + LPWSTR lpstrFileTitle = PathFindFileNameW(ofn->lpstrFile); + lstrcpynW(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle); } if (lpstrSavDir) @@ -2706,23 +2720,6 @@ fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? (lpszTemp - tempFileA) + 1 : 0; } - /* set the lpstrFileTitle */ - if(fodInfos->ofnInfos->lpstrFileTitle) - { - LPWSTR lpstrFileTitle = PathFindFileNameW(lpstrPathAndFile); - if(fodInfos->unicode) - { - LPOPENFILENAMEW ofn = fodInfos->ofnInfos; - lstrcpynW(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle); - } - else - { - LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; - WideCharToMultiByte(CP_ACP, 0, lpstrFileTitle, -1, - ofn->lpstrFileTitle, ofn->nMaxFileTitle, NULL, NULL); - } - } - /* copy currently selected filter to lpstrCustomFilter */ if (fodInfos->ofnInfos->lpstrCustomFilter) { Modified: trunk/reactos/dll/win32/comdlg32/fontdlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/fontdlg…
============================================================================== --- trunk/reactos/dll/win32/comdlg32/fontdlg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comdlg32/fontdlg.c [iso-8859-1] Sun Jun 5 18:59:07 2016 @@ -1156,9 +1156,7 @@ MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2); hdc = BeginPaint( hDlg, &ps ); - TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n", ps.fErase, - ps.rcPaint.left, ps.rcPaint.top, - ps.rcPaint.right, ps.rcPaint.bottom); + TRACE("erase %d, rect=%s\n", ps.fErase, wine_dbgstr_rect(&ps.rcPaint)); /* Paint frame */ DrawEdge( hdc, &info.rcWindow, EDGE_SUNKEN, BF_RECT|BF_ADJUST ); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 18:59:07 2016 @@ -55,7 +55,7 @@ reactos/dll/win32/clusapi # Synced to WineStaging-1.9.4 reactos/dll/win32/comcat # Synced to WineStaging-1.9.4 reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.11 -reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.4 +reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.11 reactos/dll/win32/compstui # Synced to WineStaging-1.9.4 reactos/dll/win32/credui # Synced to WineStaging-1.9.4 reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
[akhaldi] 71541: [COMCTL32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 18:56:37 2016 New Revision: 71541 URL:
http://svn.reactos.org/svn/reactos?rev=71541&view=rev
Log: [COMCTL32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368 Added: trunk/rostests/winetests/comctl32/animate.c (with props) Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt trunk/rostests/winetests/comctl32/datetime.c trunk/rostests/winetests/comctl32/header.c trunk/rostests/winetests/comctl32/listview.c trunk/rostests/winetests/comctl32/monthcal.c trunk/rostests/winetests/comctl32/progress.c trunk/rostests/winetests/comctl32/testlist.c trunk/rostests/winetests/comctl32/toolbar.c trunk/rostests/winetests/comctl32/tooltips.c Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/CMakeL…
============================================================================== --- trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/CMakeLists.txt [iso-8859-1] Sun Jun 5 18:56:37 2016 @@ -4,6 +4,7 @@ add_definitions(-DUSE_WINE_TODOS) list(APPEND SOURCE + animate.c button.c comboex.c datetime.c Added: trunk/rostests/winetests/comctl32/animate.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/animat…
============================================================================== --- trunk/rostests/winetests/comctl32/animate.c (added) +++ trunk/rostests/winetests/comctl32/animate.c [iso-8859-1] Sun Jun 5 18:56:37 2016 @@ -0,0 +1,182 @@ +/* Unit tests for the animate control. + * + * Copyright 2016 Bruno Jesus + * + * 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 "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "commctrl.h" + +#include "wine/test.h" + +#define SEARCHING_AVI_INDEX 151 /* From shell32 resource library */ +#define INVALID_AVI_INDEX 0xffff + +static HWND hAnimateParentWnd, hAnimateWnd; +static const char animateTestClass[] = "AnimateTestClass"; +static WNDPROC animate_wndproc; +static HANDLE shell32; + +/* try to make sure pending X events have been processed before continuing */ +static void flush_events(void) +{ + MSG msg; + int diff = 100; + DWORD time = GetTickCount() + diff; + + while (diff > 0) + { + if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break; + while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); + diff = time - GetTickCount(); + } +} + +static LRESULT CALLBACK animate_test_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_DESTROY: + PostQuitMessage(0); + break; + + default: + return DefWindowProcA(hWnd, msg, wParam, lParam); + } + return 0L; +} + +static void update_window(HWND hWnd) +{ + UpdateWindow(hWnd); + ok(!GetUpdateRect(hWnd, NULL, FALSE), "GetUpdateRect must return zero after UpdateWindow\n"); +} + +static void create_animate(DWORD parent_style, DWORD animate_style) +{ + WNDCLASSA wc; + RECT rect; + BOOL ret; + + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandleA(NULL); + wc.hIcon = NULL; + wc.hCursor = LoadCursorA(NULL, (LPCSTR)IDC_ARROW); + wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); + wc.lpszMenuName = NULL; + wc.lpszClassName = animateTestClass; + wc.lpfnWndProc = animate_test_wnd_proc; + RegisterClassA(&wc); + + SetRect(&rect, 0, 0, 200, 200); + ret = AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); + ok(ret, "got %d\n", ret); + + hAnimateParentWnd = CreateWindowExA(0, animateTestClass, "Animate Test", WS_OVERLAPPEDWINDOW | parent_style, + CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, GetModuleHandleA(NULL), 0); + ok(hAnimateParentWnd != NULL, "failed to create parent wnd\n"); + + GetClientRect(hAnimateParentWnd, &rect); + hAnimateWnd = CreateWindowExA(0, ANIMATE_CLASSA, NULL, WS_CHILD | WS_VISIBLE | animate_style, + 0, 0, rect.right, rect.bottom, hAnimateParentWnd, NULL, shell32, 0); + ok(hAnimateWnd != NULL, "failed to create parent wnd\n"); + animate_wndproc = (WNDPROC)SetWindowLongPtrA(hAnimateWnd, GWLP_WNDPROC, 0); + + ShowWindow(hAnimateParentWnd, SW_SHOWNORMAL); + ok(GetUpdateRect(hAnimateParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n"); + flush_events(); + update_window(hAnimateParentWnd); +} + +static void init(void) +{ + HMODULE hComctl32; + BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); + + hComctl32 = GetModuleHandleA("comctl32.dll"); + pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); + if (pInitCommonControlsEx) + { + INITCOMMONCONTROLSEX iccex; + iccex.dwSize = sizeof(iccex); + iccex.dwICC = ICC_ANIMATE_CLASS; + pInitCommonControlsEx(&iccex); + } + else + InitCommonControls(); + + shell32 = LoadLibraryA("Shell32.dll"); +} + +static void destroy_animate(void) +{ + MSG msg; + + PostMessageA(hAnimateParentWnd, WM_CLOSE, 0, 0); + while (GetMessageA(&msg,0,0,0)) + { + TranslateMessage(&msg); + DispatchMessageA(&msg); + } + hAnimateParentWnd = NULL; +} + +static void cleanup(void) +{ + UnregisterClassA(animateTestClass, GetModuleHandleA(NULL)); +} + +static void test_play(void) +{ + LONG res; + DWORD err; + + create_animate(0, 0); + SetLastError(0xdeadbeef); + res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, (LPARAM)MAKEINTRESOURCE(INVALID_AVI_INDEX)); + err = GetLastError(); + ok(res == 0, "Invalid video should have failed\n"); + ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %u\n", err); + + SetLastError(0xdeadbeef); + res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1)); + ok(res == 0, "Play should have failed\n"); + ok(err == ERROR_RESOURCE_NAME_NOT_FOUND, "Expected 1814, got %u\n", err); + destroy_animate(); + + create_animate(0, 0); + res = SendMessageA(hAnimateWnd, ACM_OPENA,(WPARAM)shell32, (LPARAM)MAKEINTRESOURCE(SEARCHING_AVI_INDEX)); + ok(res != 0, "Load AVI resource failed\n"); + res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1)); + ok(res != 0, "Play should have worked\n"); + destroy_animate(); +} + +START_TEST(animate) +{ + init(); + + test_play(); + + cleanup(); +} Propchange: trunk/rostests/winetests/comctl32/animate.c ------------------------------------------------------------------------------ svn:eol-style = native 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] Sun Jun 5 18:56:37 2016 @@ -365,9 +365,7 @@ r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); expect(1, r); r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - todo_wine { - ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); - } + ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); expect_systime(&st[1], &getSt[1]); r = SendMessageA(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); @@ -410,6 +408,13 @@ expect_systime(&st[1], &getSt[1]); ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_range_seq, "test_dtm_set_and_get_range", FALSE); + + /* DTM_SETRANGE with 0 flags */ + r = SendMessageA(hWnd, DTM_SETRANGE, 0, (LPARAM)st); + ok(r, "got %lu\n", r); + r = SendMessageA(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); + ok(r == 0, "got %lu\n", r); + ok(getSt[0].wYear == 0 && getSt[1].wYear == 0, "got %u, %u\n", getSt[0].wYear, getSt[1].wYear); DestroyWindow(hWnd); } 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] Sun Jun 5 18:56:37 2016 @@ -1005,8 +1005,19 @@ ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, "adder header control to parent", FALSE); + timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, 0); + ok(timeout == 1000, "got %d\n", timeout); + + timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, 0); + ok(timeout == 1000, "got %d\n", timeout); + + timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, -100); + ok(timeout == 1000, "got %d\n", timeout); + timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); - SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout); + ok(timeout == -100, "got %d\n", timeout); + retVal = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout); + ok(retVal == 100, "got %d\n", retVal); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1089,23 +1100,15 @@ static void test_hdm_index_messages(HWND hParent) { HWND hChild; - int retVal; - int loopcnt; - int strcmpResult; - int iSize; + int retVal, i, iSize; static const int lpiarray[2] = {1, 0}; - static int lpiarrayReceived[2]; - static char firstHeaderItem[] = "Name"; - static char secondHeaderItem[] = "Size"; - static char thirdHeaderItem[] = "Type"; - static char fourthHeaderItem[] = "Date Modified"; - static char *items[] = {firstHeaderItem, secondHeaderItem, thirdHeaderItem, fourthHeaderItem}; + static const char *item_texts[] = { + "Name", "Size", "Type", "Date Modified" + }; RECT rect; HDITEMA hdItem; - hdItem.mask = HDI_TEXT | HDI_WIDTH | HDI_FORMAT; - hdItem.fmt = HDF_LEFT; - hdItem.cxy = 80; - hdItem.cchTextMax = 260; + char buffA[32]; + int array[2]; flush_sequences(sequences, NUM_MSG_SEQUENCES); hChild = create_custom_header_control(hParent, FALSE); @@ -1116,11 +1119,15 @@ ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, "adder header control to parent", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); - for ( loopcnt = 0 ; loopcnt < 4 ; loopcnt++ ) - { - hdItem.pszText = items[loopcnt]; - retVal = SendMessageA(hChild, HDM_INSERTITEMA, loopcnt, (LPARAM) &hdItem); - ok(retVal == loopcnt, "Adding item %d failed with return value %d\n", ( loopcnt + 1 ), retVal); + for (i = 0; i < sizeof(item_texts)/sizeof(item_texts[0]); i++) + { + hdItem.mask = HDI_TEXT | HDI_WIDTH | HDI_FORMAT; + hdItem.pszText = (char*)item_texts[i]; + hdItem.fmt = HDF_LEFT; + hdItem.cxy = 80; + + retVal = SendMessageA(hChild, HDM_INSERTITEMA, i, (LPARAM) &hdItem); + ok(retVal == i, "Adding item %d failed with return value %d\n", i, retVal); } ok_sequence(sequences, HEADER_SEQ_INDEX, insertItem_seq, "insertItem sequence testing", FALSE); @@ -1146,17 +1153,21 @@ flush_sequences(sequences, NUM_MSG_SEQUENCES); + hdItem.mask = HDI_WIDTH; retVal = SendMessageA(hChild, HDM_GETITEMA, 3, (LPARAM) &hdItem); ok(retVal == FALSE, "Getting already-deleted item should return FALSE, got %d\n", retVal); + hdItem.mask = HDI_TEXT | HDI_WIDTH; + hdItem.pszText = buffA; + hdItem.cchTextMax = sizeof(buffA)/sizeof(buffA[0]); retVal = SendMessageA(hChild, HDM_GETITEMA, 0, (LPARAM) &hdItem); ok(retVal == TRUE, "Getting the 1st header item should return TRUE, got %d\n", retVal); ok_sequence(sequences, HEADER_SEQ_INDEX, getItem_seq, "getItem sequence testing", FALSE); /* check if the item is the right one */ - strcmpResult = strcmp(hdItem.pszText, firstHeaderItem); - expect(0, strcmpResult); + ok(!strcmp(hdItem.pszText, item_texts[0]), "got wrong item %s, expected %s\n", + hdItem.pszText, item_texts[0]); expect(80, hdItem.cxy); iSize = SendMessageA(hChild, HDM_GETITEMCOUNT, 0, 0); @@ -1175,15 +1186,15 @@ retVal = SendMessageA(hChild, HDM_SETORDERARRAY, iSize, (LPARAM) lpiarray); ok(retVal == TRUE, "Setting header items order should return TRUE, got %d\n", retVal); - retVal = SendMessageA(hChild, HDM_GETORDERARRAY, iSize, (LPARAM) lpiarrayReceived); + retVal = SendMessageA(hChild, HDM_GETORDERARRAY, 2, (LPARAM) array); ok(retVal == TRUE, "Getting header items order should return TRUE, got %d\n", retVal); ok_sequence(sequences, HEADER_SEQ_INDEX, orderArray_seq, "set_get_orderArray sequence testing", FALSE); /* check if the array order is set correctly and the size of the array is correct. */ expect(2, iSize); - expect(lpiarray[0], lpiarrayReceived[0]); - expect(lpiarray[1], lpiarrayReceived[1]); + ok(lpiarray[0] == array[0], "got %d, expected %d\n", array[0], lpiarray[0]); + ok(lpiarray[1] == array[1], "got %d, expected %d\n", array[1], lpiarray[1]); hdItem.mask = HDI_FORMAT; hdItem.fmt = HDF_CENTER | HDF_STRING; @@ -1718,17 +1729,17 @@ order[i-1] = start>>(4*(count-i)) & 0xf; ret = SendMessageA(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %d\n", ret); /* new order */ for(i = 1; i<=count; i++) order[i-1] = set>>(4*(count-i)) & 0xf; ret = SendMessageA(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARRAY to succeed, got %d\n", ret); /* check actual order */ ret = SendMessageA(hwnd, HDM_GETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_GETORDERARAY to succeed, got %d\n", ret); + ok_(__FILE__, line)(ret, "Expected HDM_GETORDERARRAY to succeed, got %d\n", ret); for(i = 1; i<=count; i++) array |= order[i-1]<<(4*(count-i)); 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] Sun Jun 5 18:56:37 2016 @@ -1710,9 +1710,7 @@ ok(!IsWindow(hHeader), "Header shouldn't be created\n"); ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -10; + SetRect(&rect, LVIR_BOUNDS, 1, -10, -10); r = SendMessageA(hList, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); /* right value contains garbage, probably because header columns are not set up */ expect(0, rect.bottom); @@ -2241,8 +2239,9 @@ HWND hwnd; INT r; - int i,j,item_count,selected_count; + int i, j; static const int items=5; + DWORD item_count; BYTE kstate[256]; select_task task; LONG_PTR style; @@ -2260,10 +2259,11 @@ for (i = 0; i < items; i++) insert_item(hwnd, 0); - item_count = (int)SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); + item_count = SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); expect(items, item_count); for (i = 0; i < 4; i++) { + DWORD selected_count; LVITEMA item; task = task_list[i]; @@ -2296,9 +2296,11 @@ expect(0,r); } - selected_count = (int)SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - - ok((task.result == -1 ? item_count : task.result) == selected_count, "Failed multiple selection %s. There should be %d selected items (is %d)\n", task.descr, item_count, selected_count); + selected_count = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + + ok((task.result == -1 ? item_count : task.result) == selected_count, + "Failed multiple selection %s. There should be %d selected items (is %d)\n", + task.descr, item_count, selected_count); /* Set SHIFT key released */ GetKeyboardState(kstate); @@ -2312,7 +2314,7 @@ for (i=0;i<items;i++) { insert_item(hwnd, 0); } - item_count = (int)SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); + item_count = SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); expect(items,item_count); /* try with NULL pointer */ @@ -2613,15 +2615,11 @@ r = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 2, (LPARAM)&col); expect(2, r); /* item = -1 means header, subitem index is 1 based */ - rect.left = LVIR_BOUNDS; - rect.top = 0; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 0, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); expect(0, r); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); expect(1, r); @@ -2629,9 +2627,7 @@ expect(250, rect.right); expect(3, rect.top); - rect.left = LVIR_BOUNDS; - rect.top = 2; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 2, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); expect(1, r); @@ -2642,26 +2638,20 @@ /* item LVS_REPORT padding isn't applied to subitems */ insert_item(hwnd, 0); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(1, r); expect(100, rect.left); expect(250, rect.right); - rect.left = LVIR_ICON; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_ICON, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(1, r); /* no icon attached - zero width rectangle, with no left padding */ expect(100, rect.left); expect(100, rect.right); - rect.left = LVIR_LABEL; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_LABEL, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(1, r); /* same as full LVIR_BOUNDS */ @@ -2670,9 +2660,7 @@ SendMessageA(hwnd, LVM_SCROLL, 10, 0); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(1, r); expect(90, rect.left); @@ -2684,27 +2672,19 @@ subclass_header(hwnd); flush_sequences(sequences, NUM_MSG_SEQUENCES); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); expect(1, r); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(1, r); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -10, (LPARAM)&rect); expect(1, r); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = 0; + SetRect(&rect, LVIR_BOUNDS, 1, 0, 0); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 20, (LPARAM)&rect); expect(1, r); @@ -2734,22 +2714,16 @@ insert_item(hwnd, 1); /* wrong item is refused for main item */ - rect.left = LVIR_BOUNDS; - rect.top = 0; - rect.right = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, 0, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 2, (LPARAM)&rect); expect(FALSE, r); /* for subitems rectangle is calculated even if there's no item added */ - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, 1, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 1, (LPARAM)&rect); expect(TRUE, r); - rect2.left = LVIR_BOUNDS; - rect2.top = 1; - rect2.right = rect2.bottom = -1; + SetRect(&rect2, LVIR_BOUNDS, 1, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 2, (LPARAM)&rect2); expect(TRUE, r); expect(rect.right, rect2.right); @@ -2761,25 +2735,19 @@ r = SendMessageA(hwnd, LVM_SETCOLUMNORDERARRAY, 3, (LPARAM)arr); expect(TRUE, r); - rect.left = LVIR_BOUNDS; - rect.top = 0; - rect.right = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, 0, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); expect(0, rect.left); expect(600, rect.right); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, 1, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); expect(0, rect.left); expect(200, rect.right); - rect2.left = LVIR_BOUNDS; - rect2.top = 1; - rect2.right = rect2.bottom = -1; + SetRect(&rect2, LVIR_BOUNDS, 1, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 1, (LPARAM)&rect2); expect(TRUE, r); expect(0, rect2.left); @@ -2789,9 +2757,7 @@ expect(rect.bottom, rect2.top); expect(rect.bottom * 2 - rect.top, rect2.bottom); - rect.left = LVIR_BOUNDS; - rect.top = 2; - rect.right = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, 2, -1, -1); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); expect(300, rect.left); @@ -2802,9 +2768,7 @@ /* try it for non LVS_REPORT style */ hwnd = CreateWindowA("SysListView32", "Test", LVS_ICON, 0, 0, 100, 100, NULL, NULL, GetModuleHandleA(NULL), 0); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -10; + SetRect(&rect, LVIR_BOUNDS, 1, -10, -10); r = SendMessageA(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); expect(0, r); /* rect is unchanged */ @@ -3819,7 +3783,7 @@ r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(120, 0)); expect(TRUE, r); - rect.left = rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, -1, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* left is set to (2e31-1) - XP SP2 */ @@ -3830,7 +3794,7 @@ /* switch to LVS_ICON */ SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~LVS_REPORT); - rect.left = rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, -1, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect); expect(TRUE, r); expect(0, rect.left); @@ -3941,8 +3905,7 @@ r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); expect(0, r); - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); @@ -3963,8 +3926,7 @@ r = SendMessageA(hwnd, LVM_SETCOLUMNA, 1, (LPARAM)&col); expect(TRUE, r); - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); @@ -3972,15 +3934,13 @@ expect(0, rect.left); expect(150, rect.right); - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_SELECTBOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding */ expect(2, rect.left); - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_LABEL, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding, column width */ @@ -3988,8 +3948,7 @@ expect(50, rect.right); /* no icons attached */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_ICON, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding */ @@ -4006,16 +3965,14 @@ /* 1 indexed column width + padding */ expect(102, pt.x); /* rect is at zero too */ - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); expect(0, rect.left); /* just width sum */ expect(150, rect.right); - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_SELECTBOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* column width + padding */ @@ -4050,16 +4007,14 @@ expect(TRUE, r); /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_ICON, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + stateicon width */ expect(18, rect.left); expect(18, rect.right); /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_LABEL, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + stateicon width -> column width */ @@ -4082,16 +4037,14 @@ expect(TRUE, r); /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_ICON, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding, icon width */ expect(2, rect.left); expect(18, rect.right); /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_LABEL, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + icon width -> column width */ @@ -4099,8 +4052,7 @@ expect(50, rect.right); /* select bounds */ - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_SELECTBOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding, column width */ @@ -4116,8 +4068,7 @@ expect(TRUE, r); /* bounds */ - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_BOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + 1 icon width, column width */ @@ -4125,8 +4076,7 @@ expect(150, rect.right); /* select bounds */ - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_SELECTBOUNDS, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + 1 icon width, column width */ @@ -4134,8 +4084,7 @@ expect(50, rect.right); /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_LABEL, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + 2 icon widths, column width */ @@ -4143,8 +4092,7 @@ expect(50, rect.right); /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; + SetRect(&rect, LVIR_ICON, -1, -1, -1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); expect(TRUE, r); /* padding + 1 icon width indentation, icon width */ 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] Sun Jun 5 18:56:37 2016 @@ -265,6 +265,7 @@ SYSTEMTIME st[2], st1[2], today; int res, month_range; DWORD limits; + BOOL r; hwnd = CreateWindowA(MONTHCAL_CLASSA, "MonthCal", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, 0, 300, 300, 0, 0, NULL, NULL); @@ -307,6 +308,9 @@ expect(0, st[1].wSecond); expect(0, st[1].wMilliseconds); + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, 0); + ok(limits == 0, "got %u\n", limits); + GetSystemTime(&st[0]); st[1] = st[0]; @@ -452,6 +456,40 @@ expect(0, st1[1].wMinute); expect(0, st1[1].wSecond); expect(0, st1[1].wMilliseconds); + + /* 0 limit flags */ + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + + GetSystemTime(st); + st[1] = st[0]; + st[1].wYear++; + r = SendMessageA(hwnd, MCM_SETRANGE, 0, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st); + ok(limits == 0, "got 0x%08x\n", limits); + ok(st[0].wYear == 0 && st[1].wYear == 0, "got %u, %u\n", st[0].wYear, st[1].wYear); + + /* flags are 0, set min limit */ + GetSystemTime(st); + st[1] = st[0]; + st[1].wYear++; + + r = SendMessageA(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MIN, "got 0x%08x\n", limits); + ok(st1[1].wYear == 0, "got %u\n", st1[1].wYear); + + /* now set max limit, check flags */ + r = SendMessageA(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st); + ok(r, "got %d\n", r); + + limits = SendMessageA(hwnd, MCM_GETRANGE, 0, (LPARAM)st1); + ok(limits == GDTR_MAX, "got 0x%08x\n", limits); + ok(st1[0].wYear == 0, "got %u\n", st1[0].wYear); DestroyWindow(hwnd); } @@ -1860,7 +1898,7 @@ ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, 0); ok(ret == 0, "got %d\n", ret); - r.left = r.right = r.top = r.bottom = 0; + SetRectEmpty(&r); ret = SendMessageA(hwnd, MCM_SIZERECTTOMIN, 0, (LPARAM)&r); if (ret == 0) { Modified: trunk/rostests/winetests/comctl32/progress.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/progre…
============================================================================== --- trunk/rostests/winetests/comctl32/progress.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/progress.c [iso-8859-1] Sun Jun 5 18:56:37 2016 @@ -123,11 +123,8 @@ wc.lpszClassName = progressTestClass; wc.lpfnWndProc = progress_test_wnd_proc; RegisterClassA(&wc); - - rect.left = 0; - rect.top = 0; - rect.right = 400; - rect.bottom = 20; + + SetRect(&rect, 0, 0, 400, 20); ret = AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); ok(ret, "got %d\n", ret); Modified: trunk/rostests/winetests/comctl32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/testli…
============================================================================== --- trunk/rostests/winetests/comctl32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/testlist.c [iso-8859-1] Sun Jun 5 18:56:37 2016 @@ -3,6 +3,7 @@ #define STANDALONE #include <wine/test.h> +extern void func_animate(void); extern void func_button(void); extern void func_comboex(void); extern void func_datetime(void); @@ -30,6 +31,7 @@ const struct test winetest_testlist[] = { + { "button", func_animate }, { "button", func_button }, { "comboex", func_comboex }, { "datetime", func_datetime }, 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] Sun Jun 5 18:56:37 2016 @@ -399,7 +399,7 @@ ok(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 pressed\n"); ok(!SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1004, 0), "A5 not pressed anymore\n"); - /* test for inter-group crosstalk, ie. two radio groups interfering with each other */ + /* test for inter-group crosstalk, i.e. two radio groups interfering with each other */ SendMessageA(hToolbar, TB_CHECKBUTTON, 1007, 1); /* press B2 */ ok(SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 still pressed, no inter-group crosstalk\n"); ok(!SendMessageA(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 still not pressed\n"); 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] Sun Jun 5 18:56:37 2016 @@ -292,13 +292,15 @@ static void test_gettext(void) { + static const CHAR testtip2A[] = "testtip\ttest2"; + static const CHAR testtipA[] = "testtip"; HWND hwnd, notify; TTTOOLINFOA toolinfoA; TTTOOLINFOW toolinfoW; LRESULT r; CHAR bufA[10] = ""; WCHAR bufW[10] = { 0 }; - static const CHAR testtipA[] = "testtip"; + DWORD length, style; notify = create_parent_window(); ok(notify != NULL, "Expected notification window to be created\n"); @@ -320,49 +322,48 @@ toolinfoA.lParam = 0xdeadbeef; GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); - 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"); - - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); - ok(toolinfoA.lpszText == NULL, - "expected NULL, got %p\n", toolinfoA.lpszText); - - /* NULL hinst, valid resource id for text */ - toolinfoA.cbSize = sizeof(TTTOOLINFOA); - toolinfoA.hwnd = NULL; - toolinfoA.hinst = NULL; - toolinfoA.uFlags = 0; - toolinfoA.uId = 0x1233ABCD; - toolinfoA.lpszText = MAKEINTRESOURCEA(IDS_TBADD1); - toolinfoA.lParam = 0xdeadbeef; - GetClientRect(hwnd, &toolinfoA.rect); - r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); - ok(r, "failed to add a tool\n"); - - toolinfoA.hwnd = NULL; - toolinfoA.uId = 0x1233ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, "abc") == 0, "lpszText should be an empty string\n"); - - toolinfoA.hinst = (HINSTANCE)0xdeadbee; - SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); - ok(toolinfoA.hinst == NULL, "expected NULL, got %p\n", toolinfoA.hinst); - - SendMessageA(hwnd, TTM_DELTOOLA, 0, (LPARAM)&toolinfoA); - } - else - { - win_skip( "Old comctl32, not testing NULL text\n" ); - DestroyWindow( hwnd ); - return; - } + ok(r, "got %ld\n", r); + + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1234abcd; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!*toolinfoA.lpszText, "lpszText should be empty, got %s\n", toolinfoA.lpszText); + + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); +todo_wine + ok(!r, "got %ld\n", r); + ok(toolinfoA.lpszText == NULL, "expected NULL, got %p\n", toolinfoA.lpszText); + + /* NULL hinst, valid resource id for text */ + toolinfoA.cbSize = sizeof(TTTOOLINFOA); + toolinfoA.hwnd = NULL; + toolinfoA.hinst = NULL; + toolinfoA.uFlags = 0; + toolinfoA.uId = 0x1233abcd; + toolinfoA.lpszText = MAKEINTRESOURCEA(IDS_TBADD1); + toolinfoA.lParam = 0xdeadbeef; + GetClientRect(hwnd, &toolinfoA.rect); + r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); + ok(r, "failed to add a tool\n"); + + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1233abcd; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, "abc"), "got wrong text, %s\n", toolinfoA.lpszText); + + toolinfoA.hinst = (HINSTANCE)0xdeadbee; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); +todo_wine + ok(!r, "got %ld\n", r); + ok(toolinfoA.hinst == NULL, "expected NULL, got %p\n", toolinfoA.hinst); + + r = SendMessageA(hwnd, TTM_DELTOOLA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); /* add another tool with text */ toolinfoA.cbSize = sizeof(TTTOOLINFOA); @@ -376,28 +377,26 @@ GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); ok(r, "Adding the tool to the tooltip failed\n"); - if (r) - { - DWORD length; - - length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); - - toolinfoA.hwnd = NULL; - toolinfoA.uId = 0x1235ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, testtipA) == 0, "lpszText should be an empty string\n"); - - memset(bufA, 0x1f, sizeof(bufA)); - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, testtipA) == 0, - "expected %s, got %p\n", testtipA, toolinfoA.lpszText); - - length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); - } + + length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); + ok(length == 0, "Expected 0, got %d\n", length); + + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1235abcd; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %p\n", testtipA, toolinfoA.lpszText); + + memset(bufA, 0x1f, sizeof(bufA)); + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); +todo_wine + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %p\n", testtipA, toolinfoA.lpszText); + + length = SendMessageA(hwnd, WM_GETTEXTLENGTH, 0, 0); + ok(length == 0, "Expected 0, got %d\n", length); /* add another with callback text */ toolinfoA.cbSize = sizeof(TTTOOLINFOA); @@ -410,33 +409,26 @@ GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); ok(r, "Adding the tool to the tooltip failed\n"); - if (r) - { - toolinfoA.hwnd = notify; - toolinfoA.uId = 0x1236ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, testcallbackA) == 0, - "lpszText should be an (%s) string\n", testcallbackA); - - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); - ok(toolinfoA.lpszText == LPSTR_TEXTCALLBACKA, - "expected LPSTR_TEXTCALLBACKA, got %p\n", toolinfoA.lpszText); - } + + toolinfoA.hwnd = notify; + toolinfoA.uId = 0x1236abcd; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, testcallbackA), "lpszText should be an (%s) string\n", testcallbackA); + + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA); +todo_wine + ok(!r, "got %ld\n", r); + ok(toolinfoA.lpszText == LPSTR_TEXTCALLBACKA, "expected LPSTR_TEXTCALLBACKA, got %p\n", toolinfoA.lpszText); DestroyWindow(hwnd); DestroyWindow(notify); - 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; - } ok(hwnd != NULL, "failed to create tooltip wnd\n"); toolinfoW.cbSize = sizeof(TTTOOLINFOW); @@ -485,6 +477,37 @@ SendMessageW(hwnd, TTM_GETTEXTW, 0, (LPARAM)&toolinfoW); ok(toolinfoW.lpszText[0] == 0, "lpszText should be an empty string\n"); } + + /* text with embedded tabs */ + toolinfoA.cbSize = sizeof(TTTOOLINFOA); + toolinfoA.hwnd = NULL; + toolinfoA.hinst = GetModuleHandleA(NULL); + toolinfoA.uFlags = 0; + toolinfoA.uId = 0x1235abce; + strcpy(bufA, testtip2A); + toolinfoA.lpszText = bufA; + toolinfoA.lParam = 0xdeadbeef; + GetClientRect(hwnd, &toolinfoA.rect); + r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA); + ok(r, "got %ld\n", r); + + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1235abce; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, testtipA), "expected %s, got %s\n", testtipA, toolinfoA.lpszText); + + /* enable TTS_NOPREFIX, original text is retained */ + style = GetWindowLongA(hwnd, GWL_STYLE); + SetWindowLongA(hwnd, GWL_STYLE, style | TTS_NOPREFIX); + + toolinfoA.hwnd = NULL; + toolinfoA.uId = 0x1235abce; + toolinfoA.lpszText = bufA; + r = SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(!r, "got %ld\n", r); + ok(!strcmp(toolinfoA.lpszText, testtip2A), "expected %s, got %s\n", testtip2A, toolinfoA.lpszText); DestroyWindow(hwnd); }
8 years, 5 months
1
0
0
0
[akhaldi] 71540: [COMCTL32] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 18:52:20 2016 New Revision: 71540 URL:
http://svn.reactos.org/svn/reactos?rev=71540&view=rev
Log: [COMCTL32] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/comctl32/CMakeLists.txt trunk/reactos/dll/win32/comctl32/animate.c trunk/reactos/dll/win32/comctl32/comboex.c trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/datetime.c trunk/reactos/dll/win32/comctl32/header.c trunk/reactos/dll/win32/comctl32/imagelist.c trunk/reactos/dll/win32/comctl32/listview.c trunk/reactos/dll/win32/comctl32/monthcal.c trunk/reactos/dll/win32/comctl32/pager.c trunk/reactos/dll/win32/comctl32/progress.c trunk/reactos/dll/win32/comctl32/propsheet.c trunk/reactos/dll/win32/comctl32/rebar.c trunk/reactos/dll/win32/comctl32/status.c trunk/reactos/dll/win32/comctl32/syslink.c trunk/reactos/dll/win32/comctl32/tab.c trunk/reactos/dll/win32/comctl32/toolbar.c trunk/reactos/dll/win32/comctl32/tooltips.c trunk/reactos/dll/win32/comctl32/trackbar.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/comctl32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/comctl32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/CMakeLists.txt [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -4,8 +4,8 @@ -D_WINE -D_COMCTL32_) -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) +remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502) +add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600) include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) spec2def(comctl32.dll comctl32.spec ADD_IMPORTLIB) Modified: trunk/reactos/dll/win32/comctl32/animate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/animate…
============================================================================== --- trunk/reactos/dll/win32/comctl32/animate.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/animate.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -303,10 +303,7 @@ HBITMAP hbmOld2 = SelectObject(hdcFinal, hbmFinal); RECT rect; - rect.left = 0; - rect.top = 0; - rect.right = nWidth; - rect.bottom = nHeight; + SetRect(&rect, 0, 0, nWidth, nHeight); if(!infoPtr->hbrushBG) infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH); Modified: trunk/reactos/dll/win32/comctl32/comboex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comboex…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comboex.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comboex.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -1301,7 +1301,7 @@ RECT exrc, cbrc, edrc; GetWindowRect (infoPtr->hwndSelf, &exrc); GetWindowRect (infoPtr->hwndCombo, &cbrc); - edrc.left = edrc.top = edrc.right = edrc.bottom = -1; + SetRect(&edrc, -1, -1, -1, -1); if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, &edrc); TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n", wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc), @@ -1456,10 +1456,7 @@ x = xbase + xioff; y = dis->rcItem.top + (dis->rcItem.bottom - dis->rcItem.top - txtsize.cy) / 2; - rect.left = x; - rect.right = x + txtsize.cx; - rect.top = dis->rcItem.top + 1; - rect.bottom = dis->rcItem.bottom - 1; + SetRect(&rect, x, dis->rcItem.top + 1, x + txtsize.cx, dis->rcItem.bottom - 1); TRACE("drawing item %d text, rect=(%s)\n", dis->itemID, wine_dbgstr_rect(&rect)); ExtTextOutW (dis->hDC, x, y, ETO_OPAQUE | ETO_CLIPPED, Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -1,28 +1,87 @@ +diff -pudN e:\wine\dlls\comctl32/comctl32.h e:\reactos\dll\win32\comctl32/comctl32.h +--- e:\wine\dlls\comctl32/comctl32.h 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/comctl32.h 2014-03-05 11:47:40 +0100 +@@ -53,67 +53,6 @@ + extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN; + extern HBRUSH COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN; + +-/* Property sheet / Wizard */ +-#define IDD_PROPSHEET 1006 +-#define IDD_WIZARD 1020 +- +-#define IDC_TABCONTROL 12320 +-#define IDC_APPLY_BUTTON 12321 +-#define IDC_BACK_BUTTON 12323 +-#define IDC_NEXT_BUTTON 12324 +-#define IDC_FINISH_BUTTON 12325 +-#define IDC_SUNKEN_LINE 12326 +-#define IDC_SUNKEN_LINEHEADER 12327 +- +-#define IDS_CLOSE 4160 +- +-/* Toolbar customization dialog */ +-#define IDD_TBCUSTOMIZE 200 +- +-#define IDC_AVAILBTN_LBOX 201 +-#define IDC_RESET_BTN 202 +-#define IDC_TOOLBARBTN_LBOX 203 +-#define IDC_REMOVE_BTN 204 +-#define IDC_HELP_BTN 205 +-#define IDC_MOVEUP_BTN 206 +-#define IDC_MOVEDN_BTN 207 +- +-#define IDS_SEPARATOR 1024 +- +-/* Toolbar imagelist bitmaps */ +-#define IDB_STD_SMALL 120 +-#define IDB_STD_LARGE 121 +-#define IDB_VIEW_SMALL 124 +-#define IDB_VIEW_LARGE 125 +-#define IDB_HIST_SMALL 130 +-#define IDB_HIST_LARGE 131 +- +-#define IDM_TODAY 4163 +-#define IDM_GOTODAY 4164 +- +-/* Treeview Checkboxes */ +- +-#define IDT_CHECK 401 +- +- +-/* Cursors */ +-#define IDC_MOVEBUTTON 102 +-#define IDC_COPY 104 +-#define IDC_DIVIDER 106 +-#define IDC_DIVIDEROPEN 107 +- +- +-/* DragList resources */ +-#define IDI_DRAGARROW 501 +- +-/* HOTKEY internal strings */ +-#define HKY_NONE 2048 +- +-/* Tooltip icons */ +-#define IDI_TT_INFO_SM 22 +-#define IDI_TT_WARN_SM 25 +-#define IDI_TT_ERROR_SM 28 +- + typedef struct + { + COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */ +@@ -149,8 +88,6 @@ INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWST + BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN; + BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN; + +-#define COMCTL32_VERSION_MINOR 81 +- + /* Our internal stack structure of the window procedures to subclass */ + typedef struct _SUBCLASSPROCS { + SUBCLASSPROC subproc; diff -pudN e:\wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commctrl.c ---- e:\wine\dlls\comctl32/commctrl.c 2015-02-21 17:13:09 +0100 -+++ e:\reactos\dll\win32\comctl32/commctrl.c 2015-08-27 22:05:04 +0100 -@@ -52,25 +52,26 @@ - * -- ICC_WIN95_CLASSES - */ - --#include <stdarg.h> --#include <string.h> --#include <stdlib.h> -+#include "comctl32.h" - --#include "windef.h" --#include "winbase.h" --#include "wingdi.h" --#include "winuser.h" --#include "winnls.h" --#include "commctrl.h" --#include "winerror.h" --#include "winreg.h" - #define NO_SHLWAPI_STREAM --#include "shlwapi.h" --#include "comctl32.h" --#include "wine/debug.h" -+#include <shlwapi.h> +--- e:\wine\dlls\comctl32/commctrl.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/commctrl.c 2016-03-01 20:00:53 +0100 +@@ -60,6 +60,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl); @@ -42,7 +101,7 @@ static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -@@ -92,6 +93,67 @@ static const WCHAR strCC32SubclassInfo[] +@@ -81,6 +94,67 @@ static const WCHAR strCC32SubclassInfo[] 'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0 }; @@ -110,7 +169,7 @@ /*********************************************************************** * DllMain [Internal] -@@ -928,6 +990,12 @@ HRESULT WINAPI DllGetVersion (DLLVERSION +@@ -917,6 +991,12 @@ HRESULT WINAPI DllGetVersion (DLLVERSION HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) { TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline)); @@ -123,17 +182,18 @@ return S_OK; } -@@ -1591,12 +1659,114 @@ LRESULT WINAPI SetPathWordBreakProc(HWND +@@ -1580,33 +1660,114 @@ LRESULT WINAPI SetPathWordBreakProc(HWND * * Draw text with shadow. */ --int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags, +-int WINAPI DrawShadowText(HDC hdc, LPCWSTR text, UINT length, RECT *rect, DWORD flags, +- COLORREF crText, COLORREF crShadow, int offset_x, int offset_y) +int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, - COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset) ++ COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset) { -- FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags, -- crText, crShadow, ixOffset, iyOffset); -- return DrawTextW(hdc, pszText, cch, rect, DT_LEFT); +- int bkmode, ret; +- COLORREF clr; +- RECT r; + COLORREF crOldText; + RECT rcText; + INT iRet, x, y, x2, y2; @@ -143,7 +203,9 @@ + HDC hdcMem; + HFONT hOldFont; + BLENDFUNCTION bf; -+ + +- FIXME("(%p, %s, %d, %p, 0x%08x, 0x%08x, 0x%08x, %d, %d): semi-stub\n", hdc, debugstr_w(text), +- length, rect, flags, crText, crShadow, offset_x, offset_y); + /* Create 32 bit DIB section for the shadow */ + ZeroMemory(&bi, sizeof(bi)); + bi.bmiHeader.biSize = sizeof(bi.bmiHeader); @@ -158,7 +220,9 @@ + ERR("CreateDIBSection failed\n"); + return 0; + } -+ + +- bkmode = SetBkMode(hdc, TRANSPARENT); +- clr = SetTextColor(hdc, crShadow); + /* Create memory device context for new DIB section and select it */ + hdcMem = CreateCompatibleDC(hdc); + if(!hdcMem) @@ -167,9 +231,14 @@ + DeleteObject(hbm); + return 0; + } -+ + +- /* FIXME: for shadow we need to render normally, blur it, and blend with current background. */ +- r = *rect; +- OffsetRect(&r, 1, 1); +- DrawTextW(hdc, text, length, &r, flags); + hbmOld = (HBITMAP)SelectObject(hdcMem, hbm); -+ + +- SetTextColor(hdc, crText); + /* Draw text on our helper bitmap */ + hOldFont = (HFONT)SelectObject(hdcMem, GetCurrentObject(hdc, OBJ_FONT)); + SetTextColor(hdcMem, RGB(16, 16, 16)); @@ -178,10 +247,14 @@ + SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top); + DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags); + SelectObject(hdcMem, hOldFont); -+ + +- /* with text color on top of a shadow */ +- ret = DrawTextW(hdc, text, length, rect, flags); + /* Flush GDI so data pointed by pBits is valid */ + GdiFlush(); -+ + +- SetTextColor(hdc, clr); +- SetBkMode(hdc, bkmode); + /* Set alpha of pixels (forget about colors for now. They will be changed in next loop). + We copy text image 4*5 times and each time alpha is added */ + for (x = 0; x < bi.bmiHeader.biWidth; ++x) @@ -189,7 +262,8 @@ + { + BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4]; + UINT Alpha = 0; -+ + +- return ret; + for (x2 = x - 4 + 1; x2 <= x; ++x2) + for (y2 = y; y2 < y + 5; ++y2) + { @@ -242,9 +316,9 @@ } /*********************************************************************** -@@ -1646,3 +1816,15 @@ HRESULT WINAPI LoadIconWithScaleDown(HIN - FIXME("stub: %p %s %d %d %p\n", hinst, wine_dbgstr_w(name), cx, cy, icon); - return E_NOTIMPL; +@@ -1695,3 +1856,15 @@ HRESULT WINAPI LoadIconMetric(HINSTANCE + + return LoadIconWithScaleDown(hinst, name, cx, cy, icon); } + +/*********************************************************************** @@ -259,9 +333,9 @@ + return TRUE; +} diff -pudN e:\wine\dlls\comctl32/imagelist.c e:\reactos\dll\win32\comctl32/imagelist.c ---- e:\wine\dlls\comctl32/imagelist.c 2015-02-21 17:13:09 +0100 -+++ e:\reactos\dll\win32\comctl32/imagelist.c 2015-08-27 22:05:04 +0100 -@@ -33,27 +33,14 @@ +--- e:\wine\dlls\comctl32/imagelist.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/imagelist.c 2016-06-05 19:39:00 +0100 +@@ -33,7 +33,7 @@ * * TODO: * - Add support for ILD_PRESERVEALPHA, ILD_SCALE, ILD_DPISCALE @@ -270,54 +344,42 @@ * - Thread-safe locking */ --#include <stdarg.h> --#include <stdlib.h> --#include <string.h> -- --#define COBJMACROS -- --#include "winerror.h" --#include "windef.h" --#include "winbase.h" --#include "objbase.h" --#include "wingdi.h" --#include "winuser.h" --#include "commctrl.h" - #include "comctl32.h" --#include "commoncontrols.h" --#include "wine/debug.h" --#include "wine/exception.h" -+ -+#include <commoncontrols.h> -+#include <wine/exception.h> - - WINE_DEFAULT_DEBUG_CHANNEL(imagelist); - -@@ -1246,7 +1233,7 @@ ImageList_DrawEx (HIMAGELIST himl, INT i - } - - --static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, +@@ -1229,8 +1229,11 @@ ImageList_DrawEx (HIMAGELIST himl, INT i + return ImageList_DrawIndirect (&imldp); + } + +- ++#ifdef __REACTOS__ +static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC dest_dc, int dest_x, int dest_y, ++#else + static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, ++#endif int src_x, int src_y, int cx, int cy, BLENDFUNCTION func, UINT style, COLORREF blend_col ) { -@@ -1271,9 +1258,9 @@ static BOOL alpha_blend_image( HIMAGELIS +@@ -1255,9 +1258,17 @@ static BOOL alpha_blend_image( HIMAGELIS info->bmiHeader.biYPelsPerMeter = 0; info->bmiHeader.biClrUsed = 0; info->bmiHeader.biClrImportant = 0; -- if (!(bmp = CreateDIBSection( himl->hdcImage, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done; ++#ifdef __REACTOS__ + if (!(bmp = CreateDIBSection( srce_dc, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done; ++#else + if (!(bmp = CreateDIBSection( himl->hdcImage, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done; ++#endif SelectObject( hdc, bmp ); -- BitBlt( hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY ); ++#ifdef __REACTOS__ + BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY ); ++#else + BitBlt( hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY ); ++#endif if (blend_col != CLR_NONE) { -@@ -1346,6 +1333,66 @@ done: +@@ -1330,6 +1341,68 @@ done: return ret; } ++#ifdef __REACTOS__ +HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, + int src_x, int src_y, int cx, int cy, COLORREF rgbFg) +{ @@ -377,14 +439,16 @@ + /* return the handle to our desaturated dc, that will substitute its original counterpart in the next calls */ + return hdc; +} ++#endif /* __REACTOS__ */ + /************************************************************************* * ImageList_DrawIndirect [COMCTL32.@] * -@@ -1422,6 +1469,21 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR +@@ -1406,6 +1479,23 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR oldImageFg = SetTextColor( hImageDC, RGB( 0, 0, 0 ) ); oldImageBk = SetBkColor( hImageDC, RGB( 0xff, 0xff, 0xff ) ); ++#ifdef __REACTOS__ + /* + * If the ILS_SATURATE bit is enabled we should multiply the + * RGB colors of the original image by the contents of rgbFg. @@ -399,40 +463,50 @@ + pt.x = 0; + pt.y = 0; + } ++#endif + has_alpha = (himl->has_alpha && himl->has_alpha[pimldp->i]); if (!bMask && (has_alpha || (fState & ILS_ALPHA))) { -@@ -1442,7 +1504,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR +@@ -1426,7 +1516,11 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR if (bIsTransparent) { -- bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y, ++#ifdef __REACTOS__ + bResult = alpha_blend_image( himl, hImageListDC, pimldp->hdcDst, pimldp->x, pimldp->y, ++#else + bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y, ++#endif pt.x, pt.y, cx, cy, func, fStyle, blend_col ); goto end; } -@@ -1452,7 +1514,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR +@@ -1436,7 +1530,11 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour)); PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY ); -- alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); ++#ifdef __REACTOS__ + alpha_blend_image( himl, hImageListDC, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); ++#else + alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col ); ++#endif DeleteObject (SelectObject (hImageDC, hOldBrush)); bResult = BitBlt( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy, hImageDC, 0, 0, SRCCOPY ); goto end; -@@ -1546,7 +1608,6 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR +@@ -1530,7 +1628,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPAR } } -- if (fState & ILS_SATURATE) FIXME("ILS_SATURATE: unimplemented!\n"); ++#ifndef __REACTOS__ + if (fState & ILS_SATURATE) FIXME("ILS_SATURATE: unimplemented!\n"); ++#endif if (fState & ILS_GLOW) FIXME("ILS_GLOW: unimplemented!\n"); if (fState & ILS_SHADOW) FIXME("ILS_SHADOW: unimplemented!\n"); +Common subdirectories: e:\wine\dlls\comctl32/lang and e:\reactos\dll\win32\comctl32/lang diff -pudN e:\wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listview.c ---- e:\wine\dlls\comctl32/listview.c 2015-04-05 20:44:57 +0100 -+++ e:\reactos\dll\win32\comctl32/listview.c 2015-08-27 22:05:04 +0100 -@@ -306,6 +287,9 @@ typedef struct tagLISTVIEW_INFO +--- e:\wine\dlls\comctl32/listview.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/listview.c 2016-06-05 19:39:00 +0100 +@@ -287,6 +287,9 @@ typedef struct tagLISTVIEW_INFO COLORREF clrBk; COLORREF clrText; COLORREF clrTextBk; @@ -442,7 +516,7 @@ /* font */ HFONT hDefaultFont; -@@ -1698,8 +1682,24 @@ static inline BOOL LISTVIEW_GetItemW(con +@@ -1678,8 +1681,24 @@ static inline BOOL LISTVIEW_GetItemW(con /* used to handle collapse main item column case */ static inline BOOL LISTVIEW_DrawFocusRect(const LISTVIEW_INFO *infoPtr, HDC hdc) { @@ -467,7 +541,7 @@ } /* Listview invalidation functions: use _only_ these functions to invalidate */ -@@ -4682,7 +4682,12 @@ static void LISTVIEW_DrawItemPart(LISTVI +@@ -4671,7 +4690,12 @@ static void LISTVIEW_DrawItemPart(LISTVI if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) rcLabel.bottom--; @@ -481,7 +555,7 @@ } /*** -@@ -5228,7 +5233,11 @@ enddraw: +@@ -5212,7 +5236,11 @@ enddraw: /* Draw marquee rectangle if appropriate */ if (infoPtr->bMarqueeSelect) @@ -493,7 +567,7 @@ if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); -@@ -8024,6 +8033,9 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW +@@ -8013,6 +8041,9 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW { TRACE("(color=%x)\n", color); @@ -503,7 +577,7 @@ if(infoPtr->clrBk != color) { if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush); infoPtr->clrBk = color; -@@ -8702,7 +8714,7 @@ static DWORD LISTVIEW_SetIconSpacing(LIS +@@ -8688,7 +8719,7 @@ static DWORD LISTVIEW_SetIconSpacing(LIS return oldspacing; } @@ -512,7 +586,7 @@ { INT cx, cy; -@@ -8713,8 +8725,8 @@ static inline void set_icon_size(SIZE *s +@@ -8699,8 +8730,8 @@ static inline void set_icon_size(SIZE *s } else { @@ -523,7 +597,7 @@ } } -@@ -9451,6 +9463,9 @@ static LRESULT LISTVIEW_NCCreate(HWND hw +@@ -9435,6 +9466,9 @@ static LRESULT LISTVIEW_NCCreate(HWND hw infoPtr->clrText = CLR_DEFAULT; infoPtr->clrTextBk = CLR_DEFAULT; LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow); @@ -533,7 +607,7 @@ /* set default values */ infoPtr->nFocusedItem = -1; -@@ -11735,6 +11750,14 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg +@@ -11718,6 +11752,14 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); @@ -549,9 +623,9 @@ /* case WM_TIMER: */ diff -pudN e:\wine\dlls\comctl32/propsheet.c e:\reactos\dll\win32\comctl32/propsheet.c ---- e:\wine\dlls\comctl32/propsheet.c 2015-03-21 14:04:48 +0100 -+++ e:\reactos\dll\win32\comctl32/propsheet.c 2015-08-27 22:05:04 +0100 -@@ -2432,12 +2416,19 @@ static void PROPSHEET_SetWizButtons(HWND +--- e:\wine\dlls\comctl32/propsheet.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/propsheet.c 2016-06-05 19:39:01 +0100 +@@ -2355,12 +2355,19 @@ static void PROPSHEET_SetWizButtons(HWND HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); BOOL enable_finish = ((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH); @@ -571,7 +645,7 @@ /* set the default pushbutton to an enabled button */ if (enable_finish) SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0); -@@ -2447,6 +2438,7 @@ static void PROPSHEET_SetWizButtons(HWND +@@ -2370,6 +2377,7 @@ static void PROPSHEET_SetWizButtons(HWND SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0); else SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0); @@ -579,7 +653,7 @@ if (!psInfo->hasFinish) { -@@ -2466,6 +2458,25 @@ static void PROPSHEET_SetWizButtons(HWND +@@ -2389,6 +2397,25 @@ static void PROPSHEET_SetWizButtons(HWND ShowWindow(hwndNext, SW_SHOW); } } @@ -606,8 +680,8 @@ /****************************************************************************** diff -pudN e:\wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c ---- e:\wine\dlls\comctl32/rebar.c 2015-04-05 20:44:57 +0100 -+++ e:\reactos\dll\win32\comctl32/rebar.c 2015-08-27 22:05:04 +0100 +--- e:\wine\dlls\comctl32/rebar.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/rebar.c 2016-06-05 19:39:01 +0100 @@ -50,7 +50,6 @@ * - WM_QUERYNEWPALETTE * - WM_RBUTTONDOWN @@ -616,7 +690,7 @@ * - WM_VKEYTOITEM * - WM_WININICHANGE * Notifications: -@@ -1844,16 +1828,43 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1821,16 +1820,43 @@ static LRESULT REBAR_EraseBkGnd (const R RECT cr; COLORREF old = CLR_NONE, new; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); @@ -660,7 +734,7 @@ /* draw band separator between rows */ if (lpBand->iRow != oldrow) { oldrow = lpBand->iRow; -@@ -1878,6 +1889,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1855,6 +1881,9 @@ static LRESULT REBAR_EraseBkGnd (const R } TRACE ("drawing band separator bottom (%s)\n", wine_dbgstr_rect(&rcRowSep)); @@ -670,7 +744,7 @@ } } -@@ -1888,6 +1902,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1865,6 +1894,9 @@ static LRESULT REBAR_EraseBkGnd (const R if (infoPtr->dwStyle & CCS_VERT) { rcSep.bottom = rcSep.top; rcSep.top -= SEP_WIDTH_SIZE; @@ -680,7 +754,7 @@ if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_BOTTOM, NULL); else -@@ -1896,6 +1913,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1873,6 +1905,9 @@ static LRESULT REBAR_EraseBkGnd (const R else { rcSep.right = rcSep.left; rcSep.left -= SEP_WIDTH_SIZE; @@ -690,7 +764,7 @@ if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_RIGHT, NULL); else -@@ -1926,6 +1946,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1903,6 +1938,9 @@ static LRESULT REBAR_EraseBkGnd (const R #endif } @@ -700,7 +774,7 @@ if (theme) { /* When themed, the background color is ignored (but not a -@@ -1933,6 +1956,7 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1910,6 +1948,7 @@ static LRESULT REBAR_EraseBkGnd (const R DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand); } else @@ -708,7 +782,7 @@ { old = SetBkColor (hdc, new); TRACE("%s background color=0x%06x, band %s\n", -@@ -1943,7 +1967,26 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1920,7 +1959,26 @@ static LRESULT REBAR_EraseBkGnd (const R if (lpBand->clrBack != CLR_NONE) SetBkColor (hdc, old); } @@ -735,12 +809,15 @@ return TRUE; } -@@ -2912,12 +2955,22 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT +@@ -2889,12 +2947,26 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT static LRESULT --REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect) ++#ifdef __REACTOS__ +REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect) ++#else + REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect) ++#endif { if (!lpRect) return FALSE; @@ -759,7 +836,7 @@ return TRUE; } -@@ -3224,7 +3277,11 @@ REBAR_NCCalcSize (const REBAR_INFO *info +@@ -3201,7 +3273,11 @@ REBAR_NCCalcSize (const REBAR_INFO *info else if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { /* FIXME: should use GetThemeInt */ @@ -771,16 +848,19 @@ } TRACE("new client=(%s)\n", wine_dbgstr_rect(rect)); return 0; -@@ -3675,7 +3732,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, +@@ -3652,7 +3728,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, return REBAR_ShowBand (infoPtr, wParam, lParam); case RB_SIZETORECT: -- return REBAR_SizeToRect (infoPtr, (LPCRECT)lParam); ++#ifdef __REACTOS__ + return REBAR_SizeToRect (infoPtr, wParam, (LPRECT)lParam); ++#else + return REBAR_SizeToRect (infoPtr, (LPCRECT)lParam); ++#endif /* Messages passed to parent */ -@@ -3758,6 +3815,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, +@@ -3735,6 +3815,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); @@ -793,8 +873,8 @@ /* case WM_VKEYTOITEM: supported according to ControlSpy */ diff -pudN e:\wine\dlls\comctl32/toolbar.c e:\reactos\dll\win32\comctl32/toolbar.c ---- e:\wine\dlls\comctl32/toolbar.c 2015-07-14 15:44:34 +0100 -+++ e:\reactos\dll\win32\comctl32/toolbar.c 2015-09-08 13:22:39 +0100 +--- e:\wine\dlls\comctl32/toolbar.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/toolbar.c 2016-06-05 19:39:01 +0100 @@ -33,11 +33,9 @@ * - TBSTYLE_REGISTERDROP * - TBSTYLE_EX_DOUBLEBUFFER @@ -807,7 +887,7 @@ * - WM_WININICHANGE * - Notifications: * - NM_CHAR -@@ -139,6 +123,10 @@ typedef struct +@@ -125,6 +123,10 @@ typedef struct INT nOldHit; INT nHotItem; /* index of the "hot" item */ SIZE szPadding; /* padding values around button */ @@ -818,7 +898,7 @@ INT iTopMargin; /* the top margin */ INT iListGap; /* default gap between text and image for toolbar with list style */ HFONT hDefaultFont; -@@ -204,12 +192,24 @@ typedef enum +@@ -190,12 +192,24 @@ typedef enum #define ARROW_HEIGHT 3 #define INSERTMARK_WIDTH 2 @@ -843,7 +923,7 @@ /* how wide to treat the bitmap if it isn't present */ #define NONLIST_NOTEXT_OFFSET 2 -@@ -253,7 +253,12 @@ static LRESULT TOOLBAR_SetButtonInfo(TOO +@@ -239,7 +253,12 @@ static LRESULT TOOLBAR_SetButtonInfo(TOO static inline int default_top_margin(const TOOLBAR_INFO *infoPtr) { @@ -856,7 +936,7 @@ } static inline BOOL TOOLBAR_HasDropDownArrows(DWORD exStyle) -@@ -737,10 +742,14 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in +@@ -723,10 +742,14 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in const NMTBCUSTOMDRAW *tbcd, DWORD dwItemCDFlag) { HIMAGELIST himl = NULL; @@ -872,7 +952,7 @@ if (tbcd->nmcd.uItemState & (CDIS_DISABLED | CDIS_INDETERMINATE)) { -@@ -748,7 +757,22 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in +@@ -734,7 +757,22 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in if (!himl) { himl = TOOLBAR_GetImageListForDrawing(infoPtr, btnPtr, IMAGE_LIST_DEFAULT, &index); @@ -895,7 +975,7 @@ } } else if (tbcd->nmcd.uItemState & CDIS_CHECKED || -@@ -779,9 +803,34 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in +@@ -765,9 +803,34 @@ TOOLBAR_DrawImage(const TOOLBAR_INFO *in index, himl, left, top, offset); if (draw_masked) @@ -930,7 +1010,7 @@ } /* draws a blank frame for a toolbar button */ -@@ -898,14 +947,15 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * +@@ -884,14 +947,15 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * InflateRect(&rcsep, -infoPtr->szPadding.cx, -infoPtr->szPadding.cy); TOOLBAR_DrawFlatHorizontalSeparator (&rcsep, hdc, infoPtr); } @@ -954,7 +1034,7 @@ } /* get a pointer to the text */ -@@ -1042,7 +1092,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * +@@ -1028,7 +1092,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * } } @@ -966,7 +1046,7 @@ { int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON; int stateId = TS_NORMAL; -@@ -1059,7 +1113,12 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * +@@ -1045,7 +1113,12 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL); } @@ -979,7 +1059,7 @@ TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag); if (drawSepDropDownArrow) -@@ -1587,9 +1646,14 @@ static inline SIZE TOOLBAR_MeasureButton +@@ -1571,9 +1644,14 @@ static inline SIZE TOOLBAR_MeasureButton /* ... add on the necessary padding */ if (bValidImageList) { @@ -994,7 +1074,7 @@ sizeButton.cy += LISTPAD_CY; } else -@@ -1606,7 +1670,11 @@ static inline SIZE TOOLBAR_MeasureButton +@@ -1590,7 +1668,11 @@ static inline SIZE TOOLBAR_MeasureButton { if (bHasBitmap) { @@ -1006,7 +1086,7 @@ if (sizeString.cy > 0) sizeButton.cy += 1 + sizeString.cy; sizeButton.cx = infoPtr->szPadding.cx + -@@ -1711,7 +1779,14 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *info +@@ -1695,7 +1777,14 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *info { if (btnPtr->cx) cx = btnPtr->cx; @@ -1021,7 +1101,7 @@ { SIZE sz; HDC hdc; -@@ -1970,6 +2045,17 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND h +@@ -1954,6 +2043,17 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND h SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); } @@ -1039,7 +1119,7 @@ static void TOOLBAR_TooltipAddTool(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *button) { -@@ -3551,6 +3637,36 @@ TOOLBAR_GetMaxSize (const TOOLBAR_INFO * +@@ -3535,6 +3635,36 @@ TOOLBAR_GetMaxSize (const TOOLBAR_INFO * return TRUE; } @@ -1076,7 +1156,7 @@ /* << TOOLBAR_GetObject >> */ -@@ -4806,6 +4922,44 @@ TOOLBAR_SetMaxTextRows (TOOLBAR_INFO *in +@@ -4790,6 +4920,44 @@ TOOLBAR_SetMaxTextRows (TOOLBAR_INFO *in return TRUE; } @@ -1121,16 +1201,18 @@ /* MSDN gives slightly wrong info on padding. * 1. It is not only used on buttons with the BTNS_AUTOSIZE style -@@ -6052,6 +6206,8 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wPar +@@ -6030,6 +6198,10 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wPar infoPtr->clrBtnShadow = CLR_DEFAULT; infoPtr->szPadding.cx = DEFPAD_CX; infoPtr->szPadding.cy = DEFPAD_CY; ++#ifdef __REACTOS__ + infoPtr->szSpacing.cx = DEFSPACE_CX; + infoPtr->szSpacing.cy = DEFSPACE_CY; ++#endif infoPtr->iListGap = DEFLISTGAP; infoPtr->iTopMargin = default_top_margin(infoPtr); infoPtr->dwStyle = lpcs->style; -@@ -6461,7 +6617,7 @@ TOOLBAR_SysColorChange (void) +@@ -6439,7 +6611,7 @@ TOOLBAR_SysColorChange (void) return 0; } @@ -1139,7 +1221,7 @@ /* update theme after a WM_THEMECHANGED message */ static LRESULT theme_changed (HWND hwnd) { -@@ -6470,7 +6626,7 @@ static LRESULT theme_changed (HWND hwnd) +@@ -6448,7 +6620,7 @@ static LRESULT theme_changed (HWND hwnd) OpenThemeData (hwnd, themeClass); return 0; } @@ -1148,7 +1230,7 @@ static LRESULT WINAPI ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -@@ -6575,6 +6731,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, +@@ -6553,6 +6725,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, case TB_GETMAXSIZE: return TOOLBAR_GetMaxSize (infoPtr, (LPSIZE)lParam); @@ -1159,7 +1241,7 @@ /* case TB_GETOBJECT: */ /* 4.71 */ -@@ -6716,6 +6876,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, +@@ -6694,6 +6870,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, case TB_SETMAXTEXTROWS: return TOOLBAR_SetMaxTextRows (infoPtr, wParam); @@ -1171,12 +1253,10 @@ case TB_SETPADDING: return TOOLBAR_SetPadding (infoPtr, lParam); -@@ -6855,8 +7020,12 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, - case WM_SYSCOLORCHANGE: +@@ -6835,7 +7016,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, return TOOLBAR_SysColorChange (); -- case WM_THEMECHANGED: -+ case WM_THEMECHANGED: + case WM_THEMECHANGED: +#ifdef __REACTOS__ + return TOOLBAR_ThemeChanged(hwnd); +#else @@ -1186,9 +1266,9 @@ /* case WM_WININICHANGE: */ diff -pudN e:\wine\dlls\comctl32/tooltips.c e:\reactos\dll\win32\comctl32/tooltips.c ---- e:\wine\dlls\comctl32/tooltips.c 2015-05-25 19:35:13 +0100 -+++ e:\reactos\dll\win32\comctl32/tooltips.c 2015-08-27 22:05:04 +0100 -@@ -2009,7 +1996,36 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO +--- e:\wine\dlls\comctl32/tooltips.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/tooltips.c 2016-06-05 19:39:01 +0100 +@@ -2013,7 +2013,36 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO static LRESULT TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { @@ -1226,16 +1306,16 @@ return 0; } diff -pudN e:\wine\dlls\comctl32/treeview.c e:\reactos\dll\win32\comctl32/treeview.c ---- e:\wine\dlls\comctl32/treeview.c 2015-07-14 15:44:34 +0100 -+++ e:\reactos\dll\win32\comctl32/treeview.c 2015-08-27 22:05:04 +0100 -@@ -2890,7 +2868,14 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, +--- e:\wine\dlls\comctl32/treeview.c 2016-05-31 18:00:02 +0100 ++++ e:\reactos\dll\win32\comctl32/treeview.c 2016-03-01 20:00:54 +0100 +@@ -2888,7 +2888,14 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, } } + // + // FIXME: This is correct, but is causes and infinite loop of WM_PAINT + // messages, resulting in continuous painting of the scroll bar in reactos. -+ // Comment out until the real bug is found ++ // Comment out until the real bug is found. CORE-4912 + // +#ifndef __REACTOS__ TREEVIEW_UpdateScrollBars(infoPtr); Modified: trunk/reactos/dll/win32/comctl32/datetime.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/datetim…
============================================================================== --- trunk/reactos/dll/win32/comctl32/datetime.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/datetime.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -771,10 +771,7 @@ GetTextExtentPoint32W (hdc, txt, strlenW(txt), &size); } - selection.left = 0; - selection.top = 0; - selection.right = size.cx; - selection.bottom = size.cy; + SetRect(&selection, 0, 0, size.cx, size.cy); /* center rectangle */ OffsetRect(&selection, (field->right + field->left - size.cx)/2, (field->bottom - size.cy)/2); @@ -1543,7 +1540,6 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { DATETIME_INFO *infoPtr = ((DATETIME_INFO *)GetWindowLongPtrW (hwnd, 0)); - LRESULT ret; TRACE ("%x, %lx, %lx\n", uMsg, wParam, lParam); @@ -1559,8 +1555,7 @@ return DATETIME_SetSystemTime (infoPtr, wParam, (SYSTEMTIME *) lParam); case DTM_GETRANGE: - ret = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, wParam, lParam); - return ret ? ret : 1; /* bug emulation */ + return SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, wParam, lParam); case DTM_SETRANGE: return SendMessageW (infoPtr->hMonthCal, MCM_SETRANGE, wParam, lParam); Modified: trunk/reactos/dll/win32/comctl32/header.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/header.…
============================================================================== --- trunk/reactos/dll/win32/comctl32/header.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/header.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -70,6 +70,7 @@ INT iHotItem; /* index of hot item (cursor is over this item) */ INT iHotDivider; /* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */ INT iMargin; /* width of the margin that surrounds a bitmap */ + INT filter_change_timeout; /* change timeout set with HDM_SETFILTERCHANGETIMEOUT */ HIMAGELIST himl; /* handle to an image list (may be 0) */ HEADER_ITEM *items; /* pointer to array of HEADER_ITEM's */ @@ -991,7 +992,7 @@ lpItem->iImage = I_IMAGECALLBACK; } -static LRESULT +static HIMAGELIST HEADER_CreateDragImage (HEADER_INFO *infoPtr, INT iItem) { HEADER_ITEM *lpItem; @@ -1005,7 +1006,7 @@ HFONT hFont; if (iItem >= infoPtr->uNumItem) - return FALSE; + return NULL; if (!infoPtr->bRectsValid) HEADER_SetItemBounds(infoPtr); @@ -1033,12 +1034,12 @@ DeleteDC(hMemoryDC); if (hMemory == NULL) /* if anything failed */ - return FALSE; - + return NULL; + himl = ImageList_Create(width, height, ILC_COLORDDB, 1, 1); ImageList_Add(himl, hMemory, NULL); DeleteObject(hMemory); - return (LRESULT)himl; + return himl; } static LRESULT @@ -1526,6 +1527,7 @@ infoPtr->iMargin = 3*GetSystemMetrics(SM_CXEDGE); infoPtr->nNotifyFormat = SendMessageW (infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY); + infoPtr->filter_change_timeout = 1000; hdc = GetDC (0); hOldFont = SelectObject (hdc, GetStockObject (SYSTEM_FONT)); @@ -1822,7 +1824,7 @@ { if (!HEADER_SendNotifyWithHDItemT(infoPtr, HDN_BEGINDRAG, infoPtr->iMoveItem, NULL)) { - HIMAGELIST hDragItem = (HIMAGELIST)HEADER_CreateDragImage(infoPtr, infoPtr->iMoveItem); + HIMAGELIST hDragItem = HEADER_CreateDragImage(infoPtr, infoPtr->iMoveItem); if (hDragItem != NULL) { HEADER_ITEM *lpItem = &infoPtr->items[infoPtr->iMoveItem]; @@ -2040,6 +2042,14 @@ return 0; } +static INT HEADER_SetFilterChangeTimeout(HEADER_INFO *infoPtr, INT timeout) +{ + INT old_timeout = infoPtr->filter_change_timeout; + + if (timeout != 0) + infoPtr->filter_change_timeout = timeout; + return old_timeout; +} static LRESULT WINAPI HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -2053,7 +2063,7 @@ /* case HDM_CLEARFILTER: */ case HDM_CREATEDRAGIMAGE: - return HEADER_CreateDragImage (infoPtr, (INT)wParam); + return (LRESULT)HEADER_CreateDragImage (infoPtr, (INT)wParam); case HDM_DELETEITEM: return HEADER_DeleteItem (infoPtr, (INT)wParam); @@ -2098,7 +2108,8 @@ case HDM_SETBITMAPMARGIN: return HEADER_SetBitmapMargin(infoPtr, (INT)wParam); -/* case HDM_SETFILTERCHANGETIMEOUT: */ + case HDM_SETFILTERCHANGETIMEOUT: + return HEADER_SetFilterChangeTimeout(infoPtr, (INT)lParam); case HDM_SETHOTDIVIDER: return HEADER_SetHotDivider(infoPtr, wParam, lParam); Modified: trunk/reactos/dll/win32/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imageli…
============================================================================== --- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -917,11 +917,7 @@ InternalDrag.y = y; /* draw the drag image and save the background */ - if (!ImageList_DragShowNolock(TRUE)) { - return FALSE; - } - - return TRUE; + return ImageList_DragShowNolock(TRUE); } Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -316,7 +316,7 @@ /* painting */ BOOL bIsDrawing; /* Drawing in progress */ INT nMeasureItemHeight; /* WM_MEASUREITEM result */ - BOOL bRedraw; /* WM_SETREDRAW switch */ + BOOL redraw; /* WM_SETREDRAW switch */ /* misc */ DWORD iVersion; /* CCM_[G,S]ETVERSION */ @@ -828,31 +828,30 @@ NMITEMACTIVATE nmia; LVITEMW item; - if (htInfo) { - nmia.uNewState = 0; - nmia.uOldState = 0; - nmia.uChanged = 0; - nmia.uKeyFlags = 0; - - item.mask = LVIF_PARAM|LVIF_STATE; - item.iItem = htInfo->iItem; - item.iSubItem = 0; - item.stateMask = (UINT)-1; - if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) { - nmia.lParam = item.lParam; - nmia.uOldState = item.state; - nmia.uNewState = item.state | LVIS_ACTIVATING; - nmia.uChanged = LVIF_STATE; - } - - nmia.iItem = htInfo->iItem; - nmia.iSubItem = htInfo->iSubItem; - nmia.ptAction = htInfo->pt; - - if (GetKeyState(VK_SHIFT) & 0x8000) nmia.uKeyFlags |= LVKF_SHIFT; - if (GetKeyState(VK_CONTROL) & 0x8000) nmia.uKeyFlags |= LVKF_CONTROL; - if (GetKeyState(VK_MENU) & 0x8000) nmia.uKeyFlags |= LVKF_ALT; - } + nmia.uNewState = 0; + nmia.uOldState = 0; + nmia.uChanged = 0; + nmia.uKeyFlags = 0; + + item.mask = LVIF_PARAM|LVIF_STATE; + item.iItem = htInfo->iItem; + item.iSubItem = 0; + item.stateMask = (UINT)-1; + if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) { + nmia.lParam = item.lParam; + nmia.uOldState = item.state; + nmia.uNewState = item.state | LVIS_ACTIVATING; + nmia.uChanged = LVIF_STATE; + } + + nmia.iItem = htInfo->iItem; + nmia.iSubItem = htInfo->iSubItem; + nmia.ptAction = htInfo->pt; + + if (GetKeyState(VK_SHIFT) & 0x8000) nmia.uKeyFlags |= LVKF_SHIFT; + if (GetKeyState(VK_CONTROL) & 0x8000) nmia.uKeyFlags |= LVKF_CONTROL; + if (GetKeyState(VK_MENU) & 0x8000) nmia.uKeyFlags |= LVKF_ALT; + notify_hdr(infoPtr, LVN_ITEMACTIVATE, (LPNMHDR)&nmia); } @@ -1706,7 +1705,7 @@ static inline BOOL is_redrawing(const LISTVIEW_INFO *infoPtr) { - return infoPtr->bRedraw; + return infoPtr->redraw; } static inline void LISTVIEW_InvalidateRect(const LISTVIEW_INFO *infoPtr, const RECT* rect) @@ -3123,7 +3122,11 @@ RANGE *newrng = Alloc(sizeof(RANGE)); if (!newrng) goto fail; *newrng = *((RANGE*)DPA_GetPtr(ranges->hdpa, i)); - DPA_SetPtr(clone->hdpa, i, newrng); + if (!DPA_SetPtr(clone->hdpa, i, newrng)) + { + Free(newrng); + goto fail; + } } return clone; @@ -4749,7 +4752,7 @@ - CDDS_ITEMPREPAINT - CDDS_ITEMPREPAINT|CDDS_SUBITEM | => sent n times, where n is number of subitems, - CDDS_ITEMPOSTPAINT|CDDS_SUBITEM | including item iself + CDDS_ITEMPOSTPAINT|CDDS_SUBITEM | including item itself - CDDS_ITEMPOSTPAINT other styles: @@ -4795,11 +4798,6 @@ if (cdsubitemmode & CDRF_NOTIFYSUBITEMDRAW) subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd); - else - { - nmlvcd.clrTextBk = infoPtr->clrTextBk; - nmlvcd.clrText = infoPtr->clrText; - } if (subitems->nItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW)) prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE); @@ -5450,9 +5448,7 @@ hOldbmp = SelectObject(hdc, hbmp); hOldFont = SelectObject(hdc, infoPtr->hFont); - rcItem.left = rcItem.top = 0; - rcItem.right = size.cx; - rcItem.bottom = size.cy; + SetRect(&rcItem, 0, 0, size.cx, size.cy); FillRect(hdc, &rcItem, infoPtr->hBkBrush); pos.x = pos.y = 0; @@ -5761,10 +5757,9 @@ if (infoPtr->uView == LV_VIEW_DETAILS) return; /* now for LISTs, we have to deal with the columns to the right */ - rcScroll.left = (nItemCol + 1) * infoPtr->nItemWidth; - rcScroll.top = 0; - rcScroll.right = (infoPtr->nItemCount / nPerCol + 1) * infoPtr->nItemWidth; - rcScroll.bottom = nPerCol * infoPtr->nItemHeight; + SetRect(&rcScroll, (nItemCol + 1) * infoPtr->nItemWidth, 0, + (infoPtr->nItemCount / nPerCol + 1) * infoPtr->nItemWidth, + nPerCol * infoPtr->nItemHeight); OffsetRect(&rcScroll, Origin.x, Origin.y); if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList)) InvalidateRect(infoPtr->hwndSelf, &rcScroll, TRUE); @@ -8492,10 +8487,7 @@ hbm_mask = CreateBitmap(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 1, 1, NULL); ReleaseDC(infoPtr->hwndSelf, hdc_wnd); - rc.left = rc.top = 0; - rc.right = GetSystemMetrics(SM_CXSMICON); - rc.bottom = GetSystemMetrics(SM_CYSMICON); - + SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON)); hbm_orig = SelectObject(hdc, hbm_mask); FillRect(hdc, &rc, hbr_white); InflateRect(&rc, -2, -2); @@ -8855,10 +8847,8 @@ if (infoPtr->uView == LV_VIEW_DETAILS) { - rcErase.left = 0; - rcErase.top = nFrom * infoPtr->nItemHeight; - rcErase.right = infoPtr->nItemWidth; - rcErase.bottom = nTo * infoPtr->nItemHeight; + SetRect(&rcErase, 0, nFrom * infoPtr->nItemHeight, infoPtr->nItemWidth, + nTo * infoPtr->nItemHeight); OffsetRect(&rcErase, Origin.x, Origin.y); if (IntersectRect(&rcErase, &rcErase, &infoPtr->rcList)) LISTVIEW_InvalidateRect(infoPtr, &rcErase); @@ -9484,7 +9474,7 @@ infoPtr->nFocusedItem = -1; infoPtr->nSelectionMark = -1; infoPtr->nHotItem = -1; - infoPtr->bRedraw = TRUE; + infoPtr->redraw = TRUE; infoPtr->bNoItemMetrics = TRUE; infoPtr->bDoChangeNotify = TRUE; infoPtr->autoSpacing = TRUE; @@ -10076,7 +10066,7 @@ LISTVIEW_InvalidateRect(infoPtr, &infoPtr->marqueeRect); ReleaseCapture(); - SetRect(&infoPtr->marqueeRect, 0, 0, 0, 0); + SetRectEmpty(&infoPtr->marqueeRect); infoPtr->bMarqueeSelect = FALSE; infoPtr->bScrolling = FALSE; @@ -10345,8 +10335,8 @@ ReleaseCapture(); } - SetRect(&infoPtr->marqueeRect, 0, 0, 0, 0); - SetRect(&infoPtr->marqueeDrawRect, 0, 0, 0, 0); + SetRectEmpty(&infoPtr->marqueeRect); + SetRectEmpty(&infoPtr->marqueeDrawRect); infoPtr->bDragging = FALSE; infoPtr->bMarqueeSelect = FALSE; @@ -10967,22 +10957,21 @@ * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure - * [I] bRedraw: state of redraw flag - * - * RETURN: - * DefWinProc return value - */ -static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw) -{ - TRACE("infoPtr->bRedraw=%d, bRedraw=%d\n", infoPtr->bRedraw, bRedraw); - - /* we cannot use straight equality here because _any_ non-zero value is TRUE */ - if ((infoPtr->bRedraw && bRedraw) || (!infoPtr->bRedraw && !bRedraw)) return 0; - - infoPtr->bRedraw = bRedraw; - - if(!bRedraw) return 0; - + * [I] redraw: state of redraw flag + * + * RETURN: + * Zero. + */ +static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL redraw) +{ + TRACE("old=%d, new=%d\n", infoPtr->redraw, redraw); + + if (infoPtr->redraw == !!redraw) + return 0; + + if (!(infoPtr->redraw = !!redraw)) + return 0; + if (is_autoarrange(infoPtr)) LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); LISTVIEW_UpdateScroll(infoPtr); Modified: trunk/reactos/dll/win32/comctl32/monthcal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
============================================================================== --- trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -102,7 +102,6 @@ HFONT hFont; HFONT hBoldFont; int textHeight; - int textWidth; int height_increment; int width_increment; INT delta; /* scroll rate; # of months that the */ @@ -1140,6 +1139,18 @@ } } +static int get_localized_dayname(const MONTHCAL_INFO *infoPtr, unsigned int day, WCHAR *buff, unsigned int count) +{ + LCTYPE lctype; + + if (infoPtr->dwStyle & MCS_SHORTDAYSOFWEEK) + lctype = LOCALE_SSHORTESTDAYNAME1 + day; + else + lctype = LOCALE_SABBREVDAYNAME1 + day; + + return GetLocaleInfoW(LOCALE_USER_DEFAULT, lctype, buff, count); +} + /* paint a calendar area */ static void MONTHCAL_PaintCalendar(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps, INT calIdx) { @@ -1180,7 +1191,7 @@ i = infoPtr->firstDay; for(j = 0; j < 7; j++) { - GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SABBREVDAYNAME1 + (i+j+6)%7, buf, countof(buf)); + get_localized_dayname(infoPtr, (i + j + 6) % 7, buf, countof(buf)); DrawTextW(hdc, buf, strlenW(buf), &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE); OffsetRect(&r, infoPtr->width_increment, 0); } @@ -1435,6 +1446,9 @@ if ((limits & GDTR_MIN && !MONTHCAL_ValidateDate(&range[0])) || (limits & GDTR_MAX && !MONTHCAL_ValidateDate(&range[1]))) return FALSE; + + infoPtr->rangeValid = 0; + infoPtr->minDate = infoPtr->maxDate = st_null; if (limits & GDTR_MIN) { @@ -1487,7 +1501,7 @@ { TRACE("%p\n", range); - if(!range) return FALSE; + if (!range) return 0; range[1] = infoPtr->maxDate; range[0] = infoPtr->minDate; @@ -1785,18 +1799,6 @@ /* we should preserve passed fields if hit area doesn't need them */ if (lpht->cbSize == sizeof(MCHITTESTINFO)) memcpy(&htinfo.rc, &lpht->rc, sizeof(MCHITTESTINFO) - MCHITTESTINFO_V1_SIZE); - - /* Comment in for debugging... - TRACE("%d %d wd[%d %d %d %d] d[%d %d %d %d] t[%d %d %d %d] wn[%d %d %d %d]\n", x, y, - infoPtr->wdays.left, infoPtr->wdays.right, - infoPtr->wdays.top, infoPtr->wdays.bottom, - infoPtr->days.left, infoPtr->days.right, - infoPtr->days.top, infoPtr->days.bottom, - infoPtr->todayrect.left, infoPtr->todayrect.right, - infoPtr->todayrect.top, infoPtr->todayrect.bottom, - infoPtr->weeknums.left, infoPtr->weeknums.right, - infoPtr->weeknums.top, infoPtr->weeknums.bottom); - */ /* guess in what calendar we are */ calIdx = MONTHCAL_GetCalendarFromPoint(infoPtr, &lpht->pt); @@ -2475,9 +2477,10 @@ INT xdiv, dx, dy, i, j, x, y, c_dx, c_dy; WCHAR buff[80]; TEXTMETRICW tm; - SIZE size, sz; + INT day_width; RECT client; HFONT font; + SIZE size; HDC hdc; GetClientRect(infoPtr->hwndSelf, &client); @@ -2489,28 +2492,30 @@ GetTextMetricsW(hdc, &tm); infoPtr->textHeight = tm.tmHeight + tm.tmExternalLeading + tm.tmInternalLeading; - /* find largest abbreviated day name for current locale */ - size.cx = sz.cx = 0; + /* find widest day name for current locale and font */ + day_width = 0; for (i = 0; i < 7; i++) { - if(GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SABBREVDAYNAME1 + i, - buff, countof(buff))) + SIZE sz; + + if (get_localized_dayname(infoPtr, i, buff, countof(buff))) { GetTextExtentPoint32W(hdc, buff, lstrlenW(buff), &sz); - if (sz.cx > size.cx) size.cx = sz.cx; + if (sz.cx > day_width) day_width = sz.cx; } else /* locale independent fallback on failure */ { - static const WCHAR SunW[] = { 'S','u','n',0 }; - - GetTextExtentPoint32W(hdc, SunW, lstrlenW(SunW), &size); + static const WCHAR sunW[] = { 'S','u','n' }; + GetTextExtentPoint32W(hdc, sunW, countof(sunW), &sz); + day_width = sz.cx; break; } } - infoPtr->textWidth = size.cx + 2; + day_width += 2; /* recalculate the height and width increments and offsets */ + size.cx = 0; GetTextExtentPoint32W(hdc, O0W, 2, &size); /* restore the originally selected font */ @@ -2519,7 +2524,7 @@ xdiv = (infoPtr->dwStyle & MCS_WEEKNUMBERS) ? 8 : 7; - infoPtr->width_increment = size.cx * 2 + 4; + infoPtr->width_increment = max(day_width, size.cx * 2 + 4); infoPtr->height_increment = infoPtr->textHeight; /* calculate title area */ @@ -2696,7 +2701,7 @@ infoPtr->dwStyle = lpss->styleNew; /* make room for week numbers */ - if ((lpss->styleNew ^ lpss->styleOld) & MCS_WEEKNUMBERS) + if ((lpss->styleNew ^ lpss->styleOld) & (MCS_WEEKNUMBERS | MCS_SHORTDAYSOFWEEK)) MONTHCAL_UpdateSize(infoPtr); return 0; Modified: trunk/reactos/dll/win32/comctl32/pager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/pager.c…
============================================================================== --- trunk/reactos/dll/win32/comctl32/pager.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/pager.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -656,13 +656,8 @@ lpRect->bottom -= infoPtr->nButtonSize; } - TRACE("nPos=%d, nHeight=%d, window=%s\n", - infoPtr->nPos, infoPtr->nHeight, - wine_dbgstr_rect(&rcWindow)); - - TRACE("[%p] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n", - infoPtr->hwndSelf, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top, - lpRect->left, lpRect->top, + TRACE("nPos=%d, nHeight=%d, window=%s\n", infoPtr->nPos, infoPtr->nHeight, wine_dbgstr_rect(&rcWindow)); + TRACE("[%p] client rect set to %s BtnState[%d,%d]\n", infoPtr->hwndSelf, wine_dbgstr_rect(lpRect), infoPtr->TLbtnState, infoPtr->BRbtnState); return 0; Modified: trunk/reactos/dll/win32/comctl32/progress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/progres…
============================================================================== --- trunk/reactos/dll/win32/comctl32/progress.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/progress.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -152,10 +152,7 @@ static void draw_solid_bar_H (const ProgressDrawInfo* di, int start, int end) { RECT r; - r.left = di->rect.left + start; - r.top = di->rect.top; - r.right = di->rect.left + end; - r.bottom = di->rect.bottom; + SetRect(&r, di->rect.left + start, di->rect.top, di->rect.left + end, di->rect.bottom); FillRect (di->hdc, &r, di->hbrBar); } @@ -163,10 +160,7 @@ static void draw_solid_bkg_H (const ProgressDrawInfo* di, int start, int end) { RECT r; - r.left = di->rect.left + start; - r.top = di->rect.top; - r.right = di->rect.left + end; - r.bottom = di->rect.bottom; + SetRect(&r, di->rect.left + start, di->rect.top, di->rect.left + end, di->rect.bottom); FillRect (di->hdc, &r, di->hbrBk); } @@ -174,10 +168,7 @@ static void draw_solid_bar_V (const ProgressDrawInfo* di, int start, int end) { RECT r; - r.left = di->rect.left; - r.top = di->rect.bottom - end; - r.right = di->rect.right; - r.bottom = di->rect.bottom - start; + SetRect(&r, di->rect.left, di->rect.bottom - end, di->rect.right, di->rect.bottom - start); FillRect (di->hdc, &r, di->hbrBar); } @@ -185,10 +176,7 @@ static void draw_solid_bkg_V (const ProgressDrawInfo* di, int start, int end) { RECT r; - r.left = di->rect.left; - r.top = di->rect.bottom - end; - r.right = di->rect.right; - r.bottom = di->rect.bottom - start; + SetRect(&r, di->rect.left, di->rect.bottom - end, di->rect.right, di->rect.bottom - start); FillRect (di->hdc, &r, di->hbrBk); } @@ -271,11 +259,7 @@ { RECT bgrect, r; - r.left = di->rect.left + start; - r.top = di->rect.top; - r.right = di->rect.left + end; - r.bottom = di->rect.bottom; - + SetRect(&r, di->rect.left + start, di->rect.top, di->rect.left + end, di->rect.bottom); bgrect = di->bgRect; OffsetRect(&bgrect, -bgrect.left, -bgrect.top); @@ -287,11 +271,7 @@ { RECT bgrect, r; - r.left = di->rect.left; - r.top = di->rect.bottom - end; - r.right = di->rect.right; - r.bottom = di->rect.bottom - start; - + SetRect(&r, di->rect.left, di->rect.bottom - end, di->rect.right, di->rect.bottom - start); bgrect = di->bgRect; OffsetRect(&bgrect, -bgrect.left, -bgrect.top); Modified: trunk/reactos/dll/win32/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshe…
============================================================================== --- trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -694,11 +694,7 @@ /* * Biggest page size. */ - rcPage.left = 0; - rcPage.top = 0; - rcPage.right = psInfo->width; - rcPage.bottom = psInfo->height; - + SetRect(&rcPage, 0, 0, psInfo->width, psInfo->height); MapDialogRect(hwndDlg, &rcPage); TRACE("biggest page %s\n", wine_dbgstr_rect(&rcPage)); @@ -732,11 +728,7 @@ /* * Biggest page size. */ - rc.left = 0; - rc.top = 0; - rc.right = psInfo->width; - rc.bottom = psInfo->height; - + SetRect(&rc, 0, 0, psInfo->width, psInfo->height); MapDialogRect(hwndDlg, &rc); /* retrieve the dialog units */ @@ -807,10 +799,7 @@ RECT rc, lineRect, dialogRect; /* Biggest page size */ - rc.left = 0; - rc.top = 0; - rc.right = psInfo->width; - rc.bottom = psInfo->height; + SetRect(&rc, 0, 0, psInfo->width, psInfo->height); MapDialogRect(hwndDlg, &rc); TRACE("Biggest page %s\n", wine_dbgstr_rect(&rc)); @@ -3368,11 +3357,7 @@ GetClientRect(hwndLine, &r); MapWindowPoints(hwndLine, hwnd, (LPPOINT) &r, 2); - - rzone.left = 0; - rzone.top = 0; - rzone.right = r.right; - rzone.bottom = r.top - 1; + SetRect(&rzone, 0, 0, r.right, r.top - 1); hbr = GetSysColorBrush(COLOR_WINDOW); FillRect(hdc, &rzone, hbr); Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
============================================================================== --- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -790,15 +790,11 @@ /* flag if notify required and invalidate rectangle */ if (lpBand->fDraw & NTF_INVALIDATE) { - TRACE("invalidating (%d,%d)-(%d,%d)\n", - lpBand->rcBand.left, - lpBand->rcBand.top, - lpBand->rcBand.right + SEP_WIDTH, - lpBand->rcBand.bottom + SEP_WIDTH); lpBand->fDraw &= ~NTF_INVALIDATE; work = lpBand->rcBand; work.right += SEP_WIDTH; work.bottom += SEP_WIDTH; + TRACE("invalidating %s\n", wine_dbgstr_rect(&work)); InvalidateRect(infoPtr->hwndSelf, &work, TRUE); if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE); } @@ -911,15 +907,11 @@ } if (lpBand->fDraw & NTF_INVALIDATE) { - TRACE("invalidating (%d,%d)-(%d,%d)\n", - rcBand.left, - rcBand.top, - rcBand.right + SEP_WIDTH, - rcBand.bottom + SEP_WIDTH); lpBand->fDraw &= ~NTF_INVALIDATE; work = rcBand; work.bottom += SEP_WIDTH; work.right += SEP_WIDTH; + TRACE("invalidating %s\n", wine_dbgstr_rect(&work)); InvalidateRect(infoPtr->hwndSelf, &work, TRUE); if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE); } Modified: trunk/reactos/dll/win32/comctl32/status.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.…
============================================================================== --- trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -130,60 +130,26 @@ static void STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect) { - HPEN hPenFace, hPenShadow, hPenHighlight, hOldPen; - POINT pt; - INT i; + RECT rc = *lpRect; TRACE("draw size grip %s\n", wine_dbgstr_rect(lpRect)); if (theme) { - RECT gripperRect; SIZE gripperSize; - gripperRect = *lpRect; if (SUCCEEDED (GetThemePartSize (theme, hdc, SP_GRIPPER, 0, lpRect, TS_DRAW, &gripperSize))) { - gripperRect.left = gripperRect.right - gripperSize.cx; - gripperRect.top = gripperRect.bottom - gripperSize.cy; - if (SUCCEEDED (DrawThemeBackground(theme, hdc, SP_GRIPPER, 0, &gripperRect, NULL))) + rc.left = rc.right - gripperSize.cx; + rc.top = rc.bottom - gripperSize.cy; + if (SUCCEEDED (DrawThemeBackground(theme, hdc, SP_GRIPPER, 0, &rc, NULL))) return; } } - pt.x = lpRect->right - 1; - pt.y = lpRect->bottom - 1; - - hPenFace = CreatePen( PS_SOLID, 1, comctl32_color.clr3dFace); - hOldPen = SelectObject( hdc, hPenFace ); - MoveToEx (hdc, pt.x - 12, pt.y, NULL); - LineTo (hdc, pt.x, pt.y); - LineTo (hdc, pt.x, pt.y - 13); - - pt.x--; - pt.y--; - - hPenShadow = CreatePen( PS_SOLID, 1, comctl32_color.clr3dShadow); - SelectObject( hdc, hPenShadow ); - for (i = 1; i < 11; i += 4) { - MoveToEx (hdc, pt.x - i, pt.y, NULL); - LineTo (hdc, pt.x + 1, pt.y - i - 1); - - MoveToEx (hdc, pt.x - i - 1, pt.y, NULL); - LineTo (hdc, pt.x + 1, pt.y - i - 2); - } - - hPenHighlight = CreatePen( PS_SOLID, 1, comctl32_color.clr3dHilight); - SelectObject( hdc, hPenHighlight ); - for (i = 3; i < 13; i += 4) { - MoveToEx (hdc, pt.x - i, pt.y, NULL); - LineTo (hdc, pt.x + 1, pt.y - i - 1); - } - - SelectObject (hdc, hOldPen); - DeleteObject( hPenFace ); - DeleteObject( hPenShadow ); - DeleteObject( hPenHighlight ); + rc.left = max( rc.left, rc.right - GetSystemMetrics(SM_CXVSCROLL) - 1 ); + rc.top = max( rc.top, rc.bottom - GetSystemMetrics(SM_CYHSCROLL) - 1 ); + DrawFrameControl( hdc, &rc, DFC_SCROLL, DFCS_SCROLLSIZEGRIP ); } Modified: trunk/reactos/dll/win32/comctl32/syslink.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/syslink…
============================================================================== --- trunk/reactos/dll/win32/comctl32/syslink.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/syslink.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -29,6 +29,8 @@ #include "comctl32.h" +#include <wine/list.h> + WINE_DEFAULT_DEBUG_CHANNEL(syslink); INT WINAPI StrCmpNIW(LPCWSTR,LPCWSTR,INT); @@ -51,7 +53,7 @@ typedef struct _DOC_ITEM { - struct _DOC_ITEM *Next; /* Address to the next item */ + struct list entry; UINT nText; /* Number of characters of the text */ SL_ITEM_TYPE Type; /* type of the item */ PDOC_TEXTBLOCK Blocks; /* Array of text blocks */ @@ -76,7 +78,7 @@ HWND Self; /* The window handle for this control */ HWND Notify; /* The parent handle to receive notifications */ DWORD Style; /* Styles for this control */ - PDOC_ITEM Items; /* Address to the first document item */ + struct list Items; /* Document items list */ BOOL HasFocus; /* Whether the control has the input focus */ int MouseDownID; /* ID of the link that the mouse button first selected */ HFONT Font; /* Handle to the font for text */ @@ -112,6 +114,8 @@ Free(DocItem->u.Link.szUrl); } + Free(DocItem->Blocks); + /* we don't free Text because it's just a pointer to a character in the entire window text string */ @@ -135,22 +139,15 @@ return NULL; } - Item->Next = NULL; Item->nText = textlen; Item->Type = type; Item->Blocks = NULL; - - if(LastItem != NULL) - { - LastItem->Next = Item; - } + lstrcpynW(Item->Text, Text, textlen + 1); + if (LastItem) + list_add_after(&LastItem->entry, &Item->entry); else - { - infoPtr->Items = Item; - } - - lstrcpynW(Item->Text, Text, textlen + 1); - + list_add_tail(&infoPtr->Items, &Item->entry); + return Item; } @@ -160,17 +157,13 @@ */ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr) { - PDOC_ITEM Item, Next; - - Item = infoPtr->Items; - while(Item != NULL) - { - Next = Item->Next; + DOC_ITEM *Item, *Item2; + + LIST_FOR_EACH_ENTRY_SAFE(Item, Item2, &infoPtr->Items, DOC_ITEM, entry) + { + list_remove(&Item->entry); SYSLINK_FreeDocItem(Item); - Item = Next; - } - - infoPtr->Items = NULL; + } } /*********************************************************************** @@ -514,15 +507,12 @@ */ static PDOC_ITEM SYSLINK_GetLinkItemByIndex (const SYSLINK_INFO *infoPtr, int iLink) { - PDOC_ITEM Current = infoPtr->Items; - - while(Current != NULL) - { - if((Current->Type == slLink) && (iLink-- <= 0)) - { + DOC_ITEM *Current; + + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) + { + if ((Current->Type == slLink) && (iLink-- <= 0)) return Current; - } - Current = Current->Next; } return NULL; } @@ -533,10 +523,10 @@ */ static PDOC_ITEM SYSLINK_GetFocusLink (const SYSLINK_INFO *infoPtr, int *LinkId) { - PDOC_ITEM Current = infoPtr->Items; + DOC_ITEM *Current; int id = 0; - while(Current != NULL) + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { if(Current->Type == slLink) { @@ -548,8 +538,8 @@ } id++; } - Current = Current->Next; - } + } + return NULL; } @@ -559,13 +549,13 @@ */ static PDOC_ITEM SYSLINK_GetNextLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Current) { - for(Current = (Current != NULL ? Current->Next : infoPtr->Items); - Current != NULL; - Current = Current->Next) - { - if(Current->Type == slLink) - { - return Current; + DOC_ITEM *Next; + + LIST_FOR_EACH_ENTRY(Next, Current ? &Current->entry : &infoPtr->Items, DOC_ITEM, entry) + { + if (Next->Type == slLink) + { + return Next; } } return NULL; @@ -577,38 +567,17 @@ */ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Current) { - if(Current == NULL) - { - /* returns the last link */ - PDOC_ITEM Last = NULL; - - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) - { - if(Current->Type == slLink) - { - Last = Current; - } - } - return Last; - } - else - { - /* returns the previous link */ - PDOC_ITEM Cur, Prev = NULL; - - for(Cur = infoPtr->Items; Cur != NULL; Cur = Cur->Next) - { - if(Cur == Current) - { - break; - } - if(Cur->Type == slLink) - { - Prev = Cur; - } - } - return Prev; - } + DOC_ITEM *Prev; + + LIST_FOR_EACH_ENTRY_REV(Prev, Current ? &Current->entry : list_tail(&infoPtr->Items), DOC_ITEM, entry) + { + if (Prev->Type == slLink) + { + return Prev; + } + } + + return NULL; } /*********************************************************************** @@ -672,7 +641,7 @@ GetTextMetricsW( hdc, &tm ); LineHeight = tm.tmHeight + tm.tmExternalLeading; - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { int n, nBlocks; LPWSTR tx; @@ -766,10 +735,7 @@ cbl->nChars = LineLen; cbl->nSkip = SkipChars; - cbl->rc.left = x; - cbl->rc.top = y; - cbl->rc.right = x + szDim.cx; - cbl->rc.bottom = y + szDim.cy; + SetRect(&cbl->rc, x, y, x + szDim.cx, y + szDim.cy); if (cbl->rc.right > szDoc.cx) szDoc.cx = cbl->rc.right; @@ -852,7 +818,7 @@ DeleteObject(hBrush); - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { int n; LPWSTR tx; @@ -1016,8 +982,8 @@ static PDOC_ITEM SYSLINK_SetFocusLink (const SYSLINK_INFO *infoPtr, const DOC_ITEM *DocItem) { PDOC_ITEM Current, PrevFocus = NULL; - - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) + + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { if(Current->Type == slLink) { @@ -1225,7 +1191,7 @@ PDOC_ITEM Current; int id = 0; - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { if(Current->Type == slLink) { @@ -1374,7 +1340,7 @@ PDOC_ITEM Current; int id = 0; - for(Current = infoPtr->Items; Current != NULL; Current = Current->Next) + LIST_FOR_EACH_ENTRY(Current, &infoPtr->Items, DOC_ITEM, entry) { if((Current->Type == slLink) && SYSLINK_PtInDocItem(Current, *pt) && (!MustBeEnabled || (Current->u.Link.state & LIS_ENABLED))) @@ -1740,6 +1706,9 @@ return 0; case WM_CREATE: + { + CREATESTRUCTW *cs = (CREATESTRUCTW*)lParam; + /* allocate memory for info struct */ infoPtr = Alloc (sizeof(SYSLINK_INFO)); if (!infoPtr) return -1; @@ -1747,11 +1716,11 @@ /* initialize the info struct */ infoPtr->Self = hwnd; - infoPtr->Notify = ((LPCREATESTRUCTW)lParam)->hwndParent; - infoPtr->Style = ((LPCREATESTRUCTW)lParam)->style; + infoPtr->Notify = cs->hwndParent; + infoPtr->Style = cs->style; infoPtr->Font = 0; infoPtr->LinkFont = 0; - infoPtr->Items = NULL; + list_init(&infoPtr->Items); infoPtr->HasFocus = FALSE; infoPtr->MouseDownID = -1; infoPtr->TextColor = comctl32_color.clrWindowText; @@ -1760,9 +1729,9 @@ infoPtr->BreakChar = ' '; infoPtr->IgnoreReturn = infoPtr->Style & LWS_IGNORERETURN; TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd); - SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName); + SYSLINK_SetText(infoPtr, cs->lpszName); return 0; - + } case WM_DESTROY: TRACE("SysLink Ctrl destruction, hwnd=%p\n", hwnd); SYSLINK_ClearDoc(infoPtr); Modified: trunk/reactos/dll/win32/comctl32/tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?r…
============================================================================== --- trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -1229,8 +1229,7 @@ tabwidth = max(tabwidth, infoPtr->tabMinWidth); curr->rect.right = curr->rect.left + tabwidth; - TRACE("for <%s>, l,r=%d,%d\n", - debugstr_w(curr->pszText), curr->rect.left, curr->rect.right); + TRACE("for <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect)); } /* @@ -1249,8 +1248,7 @@ curr->rect.left = 0; curItemRowCount++; - TRACE("wrapping <%s>, l,r=%d,%d\n", debugstr_w(curr->pszText), - curr->rect.left, curr->rect.right); + TRACE("wrapping <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect)); } curr->rect.bottom = 0; @@ -1363,9 +1361,7 @@ else curItemLeftPos = curr->rect.right; - TRACE("arranging <%s>, l,r=%d,%d, row=%d\n", - debugstr_w(curr->pszText), curr->rect.left, - curr->rect.right, curr->rect.top); + TRACE("arranging <%s>, rect %s\n", debugstr_w(curr->pszText), wine_dbgstr_rect(&curr->rect)); } /* @@ -1415,9 +1411,7 @@ item->rect.left += iCount * widthDiff; item->rect.right += (iCount + 1) * widthDiff; - TRACE("adjusting 1 <%s>, l,r=%d,%d\n", - debugstr_w(item->pszText), - item->rect.left, item->rect.right); + TRACE("adjusting 1 <%s>, rect %s\n", debugstr_w(item->pszText), wine_dbgstr_rect(&item->rect)); } TAB_GetItem(infoPtr, iIndex - 1)->rect.right += remainder; @@ -1427,12 +1421,8 @@ start->rect.left = clientRect.left; start->rect.right = clientRect.right - 4; - TRACE("adjusting 2 <%s>, l,r=%d,%d\n", - debugstr_w(start->pszText), - start->rect.left, start->rect.right); - + TRACE("adjusting 2 <%s>, rect %s\n", debugstr_w(start->pszText), wine_dbgstr_rect(&start->rect)); } - iIndexStart = iIndexEnd; } @@ -1765,8 +1755,7 @@ rcImage = *drawRect; rcTemp = *drawRect; - - rcText.left = rcText.top = rcText.right = rcText.bottom = 0; + SetRectEmpty(&rcText); /* get the rectangle that the text fits in */ if (item->pszText) Modified: trunk/reactos/dll/win32/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar…
============================================================================== --- trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -1290,9 +1290,7 @@ GetTextExtentPoint32W (hdc, lpText, strlenW (lpText), lpSize); /* feed above size into the rectangle for DrawText */ - myrect.left = myrect.top = 0; - myrect.right = lpSize->cx; - myrect.bottom = lpSize->cy; + SetRect(&myrect, 0, 0, lpSize->cx, lpSize->cy); /* Use DrawText to get true size as drawn (less pesky "&") */ DrawTextW (hdc, lpText, -1, &myrect, DT_VCENTER | DT_SINGLELINE | @@ -7017,7 +7015,7 @@ case WM_SYSCOLORCHANGE: return TOOLBAR_SysColorChange (); - case WM_THEMECHANGED: + case WM_THEMECHANGED: #ifdef __REACTOS__ return TOOLBAR_ThemeChanged(hwnd); #else Modified: trunk/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltip…
============================================================================== --- trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -498,6 +498,12 @@ buffer[0] = '\0'; } + if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & TTS_NOPREFIX)) { + WCHAR *ptrW; + if ((ptrW = strchrW(buffer, '\t'))) + *ptrW = 0; + } + TRACE("%s\n", debugstr_w(buffer)); } Modified: trunk/reactos/dll/win32/comctl32/trackbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackba…
============================================================================== --- trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -482,16 +482,12 @@ if (flags & TBS_VERT) { offsetthumb = (infoPtr->rcThumb.bottom - infoPtr->rcThumb.top)/2; - rcTics.left = infoPtr->rcThumb.left - 2; - rcTics.right = infoPtr->rcThumb.right + 2; - rcTics.top = infoPtr->rcChannel.top + offsetthumb; - rcTics.bottom = infoPtr->rcChannel.bottom - offsetthumb - 1; + SetRect(&rcTics, infoPtr->rcThumb.left - 2, infoPtr->rcChannel.top + offsetthumb, + infoPtr->rcThumb.right + 2, infoPtr->rcChannel.bottom - offsetthumb - 1); } else { offsetthumb = (infoPtr->rcThumb.right - infoPtr->rcThumb.left)/2; - rcTics.left = infoPtr->rcChannel.left + offsetthumb; - rcTics.right = infoPtr->rcChannel.right - offsetthumb - 1; - rcTics.top = infoPtr->rcThumb.top - 2; - rcTics.bottom = infoPtr->rcThumb.bottom + 2; + SetRect(&rcTics, infoPtr->rcChannel.left + offsetthumb, infoPtr->rcThumb.top - 2, + infoPtr->rcChannel.right - offsetthumb - 1, infoPtr->rcThumb.bottom + 2); } if (flags & (TBS_TOP | TBS_LEFT)) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 18:52:20 2016 @@ -54,7 +54,7 @@ reactos/dll/win32/cabinet # Synced to WineStaging-1.9.4 reactos/dll/win32/clusapi # Synced to WineStaging-1.9.4 reactos/dll/win32/comcat # Synced to WineStaging-1.9.4 -reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.4 +reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.11 reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.4 reactos/dll/win32/compstui # Synced to WineStaging-1.9.4 reactos/dll/win32/credui # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
[akhaldi] 71539: [PSDK] Add missing MCS_SHORTDAYSOFWEEK.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 18:45:07 2016 New Revision: 71539 URL:
http://svn.reactos.org/svn/reactos?rev=71539&view=rev
Log: [PSDK] Add missing MCS_SHORTDAYSOFWEEK. Modified: trunk/reactos/sdk/include/psdk/commctrl.h Modified: trunk/reactos/sdk/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/commctrl.…
============================================================================== --- trunk/reactos/sdk/include/psdk/commctrl.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/commctrl.h [iso-8859-1] Sun Jun 5 18:45:07 2016 @@ -4275,6 +4275,7 @@ #define MCS_NOTODAYCIRCLE 0x0008 #define MCS_NOTODAY 0x0010 #define MCS_NOTRAILINGDATES 0x0040 +#define MCS_SHORTDAYSOFWEEK 0x0080 #define GMR_VISIBLE 0 #define GMR_DAYSTATE 1
8 years, 5 months
1
0
0
0
[akhaldi] 71538: [AVIFIL32] Sync with Wine Staging 1.9.11. CORE-11368
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jun 5 18:38:02 2016 New Revision: 71538 URL:
http://svn.reactos.org/svn/reactos?rev=71538&view=rev
Log: [AVIFIL32] Sync with Wine Staging 1.9.11. CORE-11368 Modified: trunk/reactos/dll/win32/avifil32/api.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/avifil32/api.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/avifil32/api.c?r…
============================================================================== --- trunk/reactos/dll/win32/avifil32/api.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/avifil32/api.c [iso-8859-1] Sun Jun 5 18:38:02 2016 @@ -1014,14 +1014,16 @@ return AVIERR_ERROR; } for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == ERROR_SUCCESS;n++) { + WCHAR clsidW[40]; + /* get CLSID to extension */ - size = sizeof(szValue); - if (RegQueryValueW(hKey, szFileExt, szValue, &size) != ERROR_SUCCESS) + size = sizeof(clsidW); + if (RegQueryValueW(hKey, szFileExt, clsidW, &size) != ERROR_SUCCESS) break; /* search if the CLSID is already known */ for (i = 1; i <= count; i++) { - if (lstrcmpW(lp[i].szClsid, szValue) == 0) + if (lstrcmpW(lp[i].szClsid, clsidW) == 0) break; /* a new one */ } @@ -1036,7 +1038,7 @@ break; } - lstrcpyW(lp[i].szClsid, szValue); + lstrcpyW(lp[i].szClsid, clsidW); count++; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 18:38:02 2016 @@ -48,7 +48,7 @@ reactos/dll/win32/atl # Synced to WineStaging-1.9.4 reactos/dll/win32/atl80 # Synced to WineStaging-1.9.4 reactos/dll/win32/atl100 # Synced to WineStaging-1.9.4 -reactos/dll/win32/avifil32 # Synced to WineStaging-1.9.4 +reactos/dll/win32/avifil32 # Synced to WineStaging-1.9.11 reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.4 reactos/dll/win32/browseui # Out of sync reactos/dll/win32/cabinet # Synced to WineStaging-1.9.4
8 years, 5 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
23
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
Results per page:
10
25
50
100
200