comctl32/tests: Use reduced IMAGELISTDRAWPARAMS structure size for tests.

This commit is contained in:
Nikolay Sivov 2010-08-19 09:38:36 +04:00 committed by Alexandre Julliard
parent 4d6c30f90f
commit 33ee0cae46
2 changed files with 5 additions and 16 deletions

View File

@ -447,17 +447,12 @@ static void test_DrawIndirect(void)
memset(&imldp, 0, sizeof (imldp)); memset(&imldp, 0, sizeof (imldp));
ok(!pImageList_DrawIndirect(&imldp), "zero data succeeded!\n"); 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"); ok(!pImageList_DrawIndirect(&imldp), "zero hdc succeeded!\n");
imldp.hdcDst = hdc; imldp.hdcDst = hdc;
ok(!pImageList_DrawIndirect(&imldp),"zero himl succeeded!\n"); ok(!pImageList_DrawIndirect(&imldp),"zero himl succeeded!\n");
imldp.himl = himl; 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); REDRAW(hwndfortest);
WAIT; WAIT;
@ -1605,17 +1600,10 @@ static void test_IImageList_Draw(void)
hr = IImageList_Draw(imgl, &imldp); hr = IImageList_Draw(imgl, &imldp);
todo_wine ok( hr == E_INVALIDARG, "got 0x%08x\n", hr); todo_wine ok( hr == E_INVALIDARG, "got 0x%08x\n", hr);
imldp.cbSize = sizeof (imldp); imldp.cbSize = IMAGELISTDRAWPARAMS_V3_SIZE;
imldp.hdcDst = hdc; imldp.hdcDst = hdc;
imldp.himl = himl; 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); REDRAW(hwndfortest);
WAIT; WAIT;

View File

@ -580,9 +580,10 @@ typedef struct _IMAGELISTDRAWPARAMS
DWORD dwRop; DWORD dwRop;
DWORD fState; DWORD fState;
DWORD Frame; DWORD Frame;
DWORD crEffect; COLORREF crEffect;
} IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS; } IMAGELISTDRAWPARAMS, *LPIMAGELISTDRAWPARAMS;
#define IMAGELISTDRAWPARAMS_V3_SIZE CCSIZEOF_STRUCT(IMAGELISTDRAWPARAMS, dwRop)
HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **); HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **);
INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP); INT WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);