user32/tests: Fix pointer casting warnings on 64-bit.

This commit is contained in:
Alexandre Julliard 2009-01-03 20:16:16 +01:00
parent 94d9cfadb0
commit d97b398767
4 changed files with 10 additions and 10 deletions

View File

@ -175,7 +175,7 @@ static void do_parent(void)
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = SW_SHOWNORMAL;
sprintf(path_name, "%s cursoricon %x", test_argv[0], (unsigned int) parent);
sprintf(path_name, "%s cursoricon %lx", test_argv[0], (INT_PTR)parent);
ok(CreateProcessA(NULL, path_name, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed.\n");
child_process = info.hProcess;

View File

@ -160,7 +160,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
lstrcpyA((LPSTR)data->Value, str);
GlobalUnlock(hglobal);
lparam = PackDDElParam(WM_DDE_ACK, (UINT)hglobal, HIWORD(lparam));
lparam = PackDDElParam(WM_DDE_ACK, (UINT_PTR)hglobal, HIWORD(lparam));
PostMessageA(client, WM_DDE_DATA, (WPARAM)hwnd, lparam);
break;

View File

@ -50,7 +50,7 @@ static HWND
create_listbox (DWORD add_style, HWND parent)
{
HWND handle;
int ctl_id=0;
INT_PTR ctl_id=0;
if (parent)
ctl_id=1;
handle=CreateWindow ("LISTBOX", "TestList",

View File

@ -285,7 +285,7 @@ static void test_menu_ownerdraw(void)
NULL, NULL, NULL, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
@ -538,7 +538,7 @@ static void test_menu_bmp_and_string(void)
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
if( winetest_debug)
trace(" check %d,%d arrow %d avechar %d\n",
@ -552,7 +552,7 @@ static void test_menu_bmp_and_string(void)
for( szidx=0; szidx < sizeof( bmsizes) / sizeof( SIZE); szidx++) {
HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill);
HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, NULL };
ok( (int)hbm, "CreateBitmap failed err %d\n", GetLastError());
ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError());
for( txtidx = 0; txtidx < sizeof(MOD_txtsizes)/sizeof(MOD_txtsizes[0]); txtidx++) {
for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */
for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */
@ -1607,7 +1607,7 @@ static void test_menu_search_bycommand( void )
rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub2, FALSE, &info);
ok (rc, "Getting the menus info failed\n");
ok (info.wID == (UINT)hmenuSub2, "IDs differ for popup menu\n");
ok (info.wID == (UINT_PTR)hmenuSub2, "IDs differ for popup menu\n");
ok (!strcmp(info.dwTypeData, "Submenu2"), "Returned item has wrong label (%s)\n", info.dwTypeData);
DestroyMenu( hmenu );
@ -1872,7 +1872,7 @@ static void test_menu_flags( void )
hMenu = CreateMenu();
hPopupMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup");
AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup");
AppendMenu(hPopupMenu, MF_STRING | MF_HILITE | MF_DEFAULT, 101, "Item 1");
InsertMenu(hPopupMenu, 1, MF_BYPOSITION | MF_STRING | MF_HILITE | MF_DEFAULT, 102, "Item 2");
@ -1920,7 +1920,7 @@ static void test_menu_hilitemenuitem( void )
hMenu = CreateMenu();
hPopupMenu = CreatePopupMenu();
AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup");
AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup");
AppendMenu(hPopupMenu, MF_STRING, 101, "Item 1");
AppendMenu(hPopupMenu, MF_STRING, 102, "Item 2");
@ -2053,7 +2053,7 @@ static void check_menu_items(HMENU hmenu, UINT checked_cmd, UINT checked_type,
#endif
if (mii.hSubMenu)
{
ok((HMENU)mii.wID == mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd);
ok(mii.wID == (UINT_PTR)mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd);
check_menu_items(mii.hSubMenu, checked_cmd, checked_type, checked_state);
}
else