comctl32/tests: Also include LBS_NODATA cases when testing ownerdraw.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8cd569cf26
commit
423ea9790b
|
@ -462,14 +462,22 @@ static HWND create_parent( void )
|
|||
|
||||
static void test_ownerdraw(void)
|
||||
{
|
||||
static const DWORD styles[] =
|
||||
{
|
||||
0,
|
||||
LBS_NODATA
|
||||
};
|
||||
HWND parent, hLB;
|
||||
INT ret;
|
||||
RECT rc;
|
||||
UINT i;
|
||||
|
||||
parent = create_parent();
|
||||
ok(parent != NULL, "Failed to create parent window.\n");
|
||||
|
||||
hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE, parent);
|
||||
for (i = 0; i < ARRAY_SIZE(styles); i++)
|
||||
{
|
||||
hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE | styles[i], parent);
|
||||
ok(hLB != NULL, "Failed to create listbox window.\n");
|
||||
|
||||
SetForegroundWindow(hLB);
|
||||
|
@ -491,8 +499,8 @@ static void test_ownerdraw(void)
|
|||
DestroyWindow(hLB);
|
||||
|
||||
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */
|
||||
hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100,
|
||||
NULL, NULL, NULL, 0);
|
||||
hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i],
|
||||
0, 0, 100, 100, NULL, NULL, NULL, 0);
|
||||
ok(hLB != NULL, "last error 0x%08x\n", GetLastError());
|
||||
|
||||
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
|
||||
|
@ -518,6 +526,7 @@ static void test_ownerdraw(void)
|
|||
ok(ret == 42, "Unexpected item height %d.\n", ret);
|
||||
|
||||
DestroyWindow (hLB);
|
||||
}
|
||||
|
||||
DestroyWindow(parent);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue