Commit 423ea979 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

comctl32/tests: Also include LBS_NODATA cases when testing ownerdraw.

parent 8cd569cf
...@@ -462,14 +462,22 @@ static HWND create_parent( void ) ...@@ -462,14 +462,22 @@ static HWND create_parent( void )
static void test_ownerdraw(void) static void test_ownerdraw(void)
{ {
static const DWORD styles[] =
{
0,
LBS_NODATA
};
HWND parent, hLB; HWND parent, hLB;
INT ret; INT ret;
RECT rc; RECT rc;
UINT i;
parent = create_parent(); parent = create_parent();
ok(parent != NULL, "Failed to create parent window.\n"); 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"); ok(hLB != NULL, "Failed to create listbox window.\n");
SetForegroundWindow(hLB); SetForegroundWindow(hLB);
...@@ -491,8 +499,8 @@ static void test_ownerdraw(void) ...@@ -491,8 +499,8 @@ static void test_ownerdraw(void)
DestroyWindow(hLB); DestroyWindow(hLB);
/* Both FIXED and VARIABLE, FIXED should override VARIABLE. */ /* Both FIXED and VARIABLE, FIXED should override VARIABLE. */
hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE, 0, 0, 100, 100, hLB = CreateWindowA(WC_LISTBOXA, "TestList", LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE | styles[i],
NULL, NULL, NULL, 0); 0, 0, 100, 100, NULL, NULL, NULL, 0);
ok(hLB != NULL, "last error 0x%08x\n", GetLastError()); ok(hLB != NULL, "last error 0x%08x\n", GetLastError());
ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n"); ok(GetWindowLongA(hLB, GWL_STYLE) & LBS_OWNERDRAWVARIABLE, "Unexpected window style.\n");
...@@ -518,6 +526,7 @@ static void test_ownerdraw(void) ...@@ -518,6 +526,7 @@ static void test_ownerdraw(void)
ok(ret == 42, "Unexpected item height %d.\n", ret); ok(ret == 42, "Unexpected item height %d.\n", ret);
DestroyWindow (hLB); DestroyWindow (hLB);
}
DestroyWindow(parent); DestroyWindow(parent);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment