user32/tests: Remove some explicit LPARAM/WPARAM casts.

This commit is contained in:
Michael Stefaniuc 2009-12-27 14:40:19 +01:00 committed by Alexandre Julliard
parent 3b45ababfb
commit 7e2b624896
3 changed files with 30 additions and 30 deletions

View File

@ -1070,11 +1070,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(0 == ret, "expected 0 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1088,11 +1088,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(0 == ret, "expected 0 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1106,11 +1106,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(0 == ret, "expected 0 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1124,11 +1124,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2 +1;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1142,11 +1142,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2 +1;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1160,11 +1160,11 @@ static void test_edit_control_4(void)
mid = lo + (hi - lo) / 2 +1;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret);
}
for (i = mid; i <= hi; i++) {
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i));
ok(1 == ret, "expected 1 got %d\n", ret);
}
ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0);
@ -1524,7 +1524,7 @@ static void test_text_position_style(DWORD style)
/* Edit controls that are in a parent window */
hwEdit = create_child_editcontrol(style | WS_VISIBLE, 0);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 0);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 0);
@ -1534,7 +1534,7 @@ static void test_text_position_style(DWORD style)
destroy_child_editcontrol(hwEdit);
hwEdit = create_child_editcontrol(style | WS_BORDER | WS_VISIBLE, 0);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, b);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , b);
@ -1545,7 +1545,7 @@ static void test_text_position_style(DWORD style)
destroy_child_editcontrol(hwEdit);
hwEdit = create_child_editcontrol(style | WS_VISIBLE, WS_EX_CLIENTEDGE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1);
@ -1555,7 +1555,7 @@ static void test_text_position_style(DWORD style)
destroy_child_editcontrol(hwEdit);
hwEdit = create_child_editcontrol(style | WS_BORDER | WS_VISIBLE, WS_EX_CLIENTEDGE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1);
@ -1568,7 +1568,7 @@ static void test_text_position_style(DWORD style)
/* Edit controls that are popup windows */
hwEdit = create_editcontrol(style | WS_POPUP, 0);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 0);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 0);
@ -1578,7 +1578,7 @@ static void test_text_position_style(DWORD style)
DestroyWindow(hwEdit);
hwEdit = create_editcontrol(style | WS_POPUP | WS_BORDER, 0);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, b);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , b);
@ -1589,7 +1589,7 @@ static void test_text_position_style(DWORD style)
DestroyWindow(hwEdit);
hwEdit = create_editcontrol(style | WS_POPUP, WS_EX_CLIENTEDGE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1);
@ -1599,7 +1599,7 @@ static void test_text_position_style(DWORD style)
DestroyWindow(hwEdit);
hwEdit = create_editcontrol(style | WS_POPUP | WS_BORDER, WS_EX_CLIENTEDGE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE);
if (single_line)
check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1);
check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1);

View File

@ -146,7 +146,7 @@ check (const struct listbox_test test)
listbox_query (hLB, &answer);
listbox_ok (test, init, answer);
SendMessage (hLB, LB_GETITEMRECT, (WPARAM) 1, (LPARAM) &second_item);
SendMessage (hLB, LB_GETITEMRECT, 1, (LPARAM) &second_item);
buttonpress(hLB, (WORD)second_item.left, (WORD)second_item.top);
listbox_query (hLB, &answer);
@ -354,7 +354,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_1, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -363,7 +363,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_3, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -372,7 +372,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -381,7 +381,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_1, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -390,7 +390,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -399,7 +399,7 @@ static void test_selection(void)
listbox_query(hLB, &answer);
listbox_test_query(test_2, answer);
SendMessage(hLB, LB_SETSEL, FALSE, (LPARAM)-1);
SendMessage(hLB, LB_SETSEL, FALSE, -1);
listbox_query(hLB, &answer);
listbox_test_query(test_nosel, answer);
@ -1112,7 +1112,7 @@ static void test_listbox_dlgdir(void)
"expected conversion to uppercase, got %s\n", pathBuffer);
/* Loaded path should have overwritten the label text */
SendMessage(g_label, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)pathBuffer);
SendMessage(g_label, WM_GETTEXT, MAX_PATH, (LPARAM)pathBuffer);
trace("Static control after DlgDirList: %s\n", pathBuffer);
ok (strcmp("default contents", pathBuffer), "DlgDirList() did not modify static control!\n");

View File

@ -6869,8 +6869,8 @@ static const struct message WmVkAppsSeq[] = {
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_APPS, 0xc0000001 }, /* XP */
{ WM_KEYUP, wparam|lparam, VK_APPS, 0xc0000001 },
{ WM_KEYUP, sent|wparam|lparam, VK_APPS, 0xc0000001 },
{ WM_CONTEXTMENU, lparam, /*hwnd*/0, (LPARAM)-1 },
{ WM_CONTEXTMENU, sent|lparam, /*hwnd*/0, (LPARAM)-1 },
{ WM_CONTEXTMENU, lparam, /*hwnd*/0, -1 },
{ WM_CONTEXTMENU, sent|lparam, /*hwnd*/0, -1 },
{ 0 }
};
static const struct message WmVkF10Seq[] = {