HWND hwnd, fg;
RECT rect;
INT r;
+ POINT orig_pos;
hwnd = CreateWindowExA(0, "SysListView32", "foo", WS_VISIBLE|WS_CHILD|LVS_LIST,
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
ok(r == 0, "should not fail\n");
GetWindowRect(hwnd, &rect);
+ GetCursorPos(&orig_pos);
SetCursorPos(rect.left+5, rect.top+5);
flush_events();
r = SendMessageA(hwnd, WM_MOUSEMOVE, MAKELONG(1, 1), 0);
expect(1, r);
DestroyWindow(hwnd);
+ SetCursorPos(orig_pos.x, orig_pos.y);
}
static void test_callback_mask(void)
expect(5,LOWORD(r));
expect(SBT_POPOUT,HIWORD(r));
r = SendMessageW(hWndStatus, WM_GETTEXTLENGTH, 0, 0);
- ok(r == 5 || broken(0x02000005 /* NT4 */), "Expected 5, got %d\n", r);
+ ok(r == 5, "Expected 5, got %d\n", r);
r = SendMessageA(hWndStatus, SB_GETTEXTLENGTHA, 1, 0);
expect(0,LOWORD(r));
expect(SBT_OWNERDRAW,HIWORD(r));
BOOL rc;
HWND hWndSysLink;
LONG oldstyle;
+ POINT orig_pos;
if (!load_v6_module(&ctx_cookie, &hCtx))
return;
return;
}
+ /* Move the cursor off the parent window */
+ GetCursorPos(&orig_pos);
+ SetCursorPos(400, 400);
+
init_msg_sequences(sequences, NUM_MSG_SEQUENCE);
/* Create parent window */
DestroyWindow(hWndSysLink);
DestroyWindow(hWndParent);
unload_v6_module(ctx_cookie, hCtx);
+ SetCursorPos(orig_pos.x, orig_pos.y);
}
EqualRect(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton))) { \
win_skip("Alternate rect found\n"); \
tbsize_alt_numtests++; \
- } else if (!(mask&1)) { \
+ } else todo_wine_if(mask&1) \
check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); \
- } else {\
- todo_wine { check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); } \
- } \
mask >>= 1; \
} \
tbsize_numtests++; \
DWORD iterationNumber;
WNDCLASSA wc;
LRESULT lResult;
+ POINT orig_pos;
/* Create a class to use the custom draw wndproc */
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = custom_draw_wnd_proc;
RegisterClassA(&wc);
+ GetCursorPos(&orig_pos);
+
for (iterationNumber = 0;
iterationNumber < sizeof(expectedResults)/sizeof(expectedResults[0]);
iterationNumber++) {
DestroyWindow(parent);
}
-
+ SetCursorPos(orig_pos.x, orig_pos.y);
}
static const CHAR testcallbackA[] = "callback";
DestroyWindow(hwnd);
}
+static void test_TVS_FULLROWSELECT(void)
+{
+ DWORD style;
+ HWND hwnd;
+
+ /* try to create both with TVS_HASLINES and TVS_FULLROWSELECT */
+ hwnd = create_treeview_control(TVS_FULLROWSELECT);
+
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ok((style & (TVS_FULLROWSELECT | TVS_HASLINES)) == (TVS_FULLROWSELECT | TVS_HASLINES), "got style 0x%08x\n", style);
+
+ DestroyWindow(hwnd);
+
+ /* create just with TVS_HASLINES, try to enable TVS_FULLROWSELECT later */
+ hwnd = create_treeview_control(0);
+
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ SetWindowLongA(hwnd, GWL_STYLE, style | TVS_FULLROWSELECT);
+ style = GetWindowLongA(hwnd, GWL_STYLE);
+ ok(style & TVS_FULLROWSELECT, "got style 0x%08x\n", style);
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(treeview)
{
HMODULE hComctl32;
test_WM_GETDLGCODE();
test_customdraw();
test_WM_KEYDOWN();
+ test_TVS_FULLROWSELECT();
if (!load_v6_module(&ctx_cookie, &hCtx))
{