Nikolay Sivov : comctl32/tests: Use reduced IMAGELISTDRAWPARAMS structure size for tests.
Alexandre Julliard
julliard at winehq.org
Fri Aug 20 10:19:14 CDT 2010
Module: wine
Branch: master
Commit: 33ee0cae46f98842c26d803478e38ffc272625c3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=33ee0cae46f98842c26d803478e38ffc272625c3
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Aug 19 09:38:36 2010 +0400
comctl32/tests: Use reduced IMAGELISTDRAWPARAMS structure size for tests.
---
dlls/comctl32/tests/imagelist.c | 18 +++---------------
include/commctrl.h | 3 ++-
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 88e159b..de6d2c3 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -447,17 +447,12 @@ static void test_DrawIndirect(void)
memset(&imldp, 0, sizeof (imldp));
ok(!pImageList_DrawIndirect(&imldp), "zero data succeeded!\n");
- imldp.cbSize = sizeof (imldp);
+ imldp.cbSize = IMAGELISTDRAWPARAMS_V3_SIZE;
ok(!pImageList_DrawIndirect(&imldp), "zero hdc succeeded!\n");
imldp.hdcDst = hdc;
ok(!pImageList_DrawIndirect(&imldp),"zero himl succeeded!\n");
imldp.himl = himl;
- if (!pImageList_DrawIndirect(&imldp))
- {
- /* Earlier versions of native comctl32 use a smaller structure */
- imldp.cbSize -= 3 * sizeof(DWORD);
- ok(pImageList_DrawIndirect(&imldp),"DrawIndirect should succeed\n");
- }
+
REDRAW(hwndfortest);
WAIT;
@@ -1605,17 +1600,10 @@ static void test_IImageList_Draw(void)
hr = IImageList_Draw(imgl, &imldp);
todo_wine ok( hr == E_INVALIDARG, "got 0x%08x\n", hr);
- imldp.cbSize = sizeof (imldp);
+ imldp.cbSize = IMAGELISTDRAWPARAMS_V3_SIZE;
imldp.hdcDst = hdc;
imldp.himl = himl;
- if (FAILED(IImageList_Draw(imgl, &imldp)))
- {
- /* Earlier versions of native comctl32 use a smaller structure */
- imldp.cbSize -= 3 * sizeof(DWORD);
- ok(SUCCEEDED(IImageList_Draw(imgl, &imldp)), "should succeed\n");
- }
-
REDRAW(hwndfortest);
WAIT;
diff --git a/include/commctrl.h b/include/commctrl.h
index fdd6951..e7d0ab4 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -580,9 +580,10 @@ typedef struct _IMAGELISTDRAWPARAMS
DWORD dwRop;
DWORD fState;
DWORD Frame;
- DWORD crEffect;
+ COLORREF crEffect;
} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
+#define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **);
INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
More information about the wine-cvs
mailing list