Author: sserapion Date: Sat Nov 7 01:10:56 2009 New Revision: 43992
URL: http://svn.reactos.org/svn/reactos?rev=43992&view=rev Log: Fix user32 build mostly tested in trunk. Some local changes still not committed.
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/include/window.h branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/class.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/clipboard.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/menu.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/messagebox.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/nonclient.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/prop.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/spy.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/window.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/include/window.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/include/window.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/include/window.h [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -65,5 +65,5 @@ BOOL Unicode);
HWND* WIN_ListChildren (HWND hWndparent); -ULONG_PTR FASTCALL IntGetWndProc(PWND, BOOL); +WNDPROC FASTCALL IntGetWndProc(PWND, BOOL); DWORD WINAPI GetRealWindowOwner(HWND);
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/class.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -266,11 +266,11 @@ // // Based on IntGetClsWndProc // -ULONG_PTR FASTCALL +WNDPROC FASTCALL IntGetWndProc(PWND pWnd, BOOL Ansi) { INT i; - ULONG_PTR gcpd, Ret = 0; + WNDPROC gcpd, Ret = 0; PCLS Class = DesktopPtrToUser(pWnd->pcls);
if (!Class) return Ret; @@ -282,9 +282,9 @@ if (GETPFNSERVER(i) == pWnd->lpfnWndProc) { if (Ansi) - Ret = (ULONG_PTR)GETPFNCLIENTA(i); + Ret = GETPFNCLIENTA(i); else - Ret = (ULONG_PTR)GETPFNCLIENTW(i); + Ret = GETPFNCLIENTW(i); } } return Ret; @@ -296,36 +296,36 @@ is treated specially. */ if (Class->fnid == FNID_EDIT) - Ret = (ULONG_PTR)pWnd->lpfnWndProc; + Ret = pWnd->lpfnWndProc; else { // Set return proc. - Ret = (ULONG_PTR)pWnd->lpfnWndProc; + Ret = pWnd->lpfnWndProc;
if (Class->fnid <= FNID_GHOST && Class->fnid >= FNID_BUTTON) { if (Ansi) { if (GETPFNCLIENTW(Class->fnid) == pWnd->lpfnWndProc) - Ret = (ULONG_PTR)GETPFNCLIENTA(Class->fnid); + Ret = GETPFNCLIENTA(Class->fnid); } else { if (GETPFNCLIENTA(Class->fnid) == pWnd->lpfnWndProc) - Ret = (ULONG_PTR)GETPFNCLIENTW(Class->fnid); + Ret = GETPFNCLIENTW(Class->fnid); } } // Return on the change. - if ( Ret != (ULONG_PTR)pWnd->lpfnWndProc) + if ( Ret != pWnd->lpfnWndProc) return Ret; }
if ( Ansi == !!(pWnd->state & WNDS_ANSIWINDOWPROC) ) return Ret;
- gcpd = NtUserGetCPD( UserHMGetHandle(pWnd), - (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow, - Ret); + gcpd = (WNDPROC)NtUserGetCPD( UserHMGetHandle(pWnd), + (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow, + (ULONG_PTR)&Ret);
return (gcpd ? gcpd : Ret); } @@ -658,7 +658,7 @@ }
-LONG_PTR Internal_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode ) +LONG_PTR IntGetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode ) { LONG_PTR retvalue = 0; WND *wndPtr; @@ -724,7 +724,7 @@ WINAPI GetWindowLongA ( HWND hWnd, int nIndex ) { - return Internal_GetWindowLong( hWnd, nIndex, sizeof(LONG), FALSE ); + return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), FALSE ); }
/* @@ -734,30 +734,30 @@ WINAPI GetWindowLongW(HWND hWnd, int nIndex) { - return Internal_GetWindowLong( hWnd, nIndex, sizeof(LONG), TRUE ); + return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), TRUE ); }
#ifdef _WIN64 /* - * @unimplemented + * @implemented */ LONG_PTR WINAPI GetWindowLongPtrA(HWND hWnd, INT nIndex) { - return Internal_GetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), FALSE ); -} - -/* - * @unimplemented + return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), FALSE ); +} + +/* + * @implemented */ LONG_PTR WINAPI GetWindowLongPtrW(HWND hWnd, INT nIndex) { - return Internal_GetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), TRUE ); + return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), TRUE );
} #endif // _WIN64 @@ -784,17 +784,7 @@ } break; } - return Internal_GetWindowLong( hWnd, nIndex, sizeof(WORD), FALSE ); -} - -/* - * @implemented - */ -WORD -WINAPI -SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord ) -{ - return (WORD)NtUserSetWindowLong ( hWnd, nIndex, (LONG)wNewWord, TRUE ); + return IntGetWindowLong( hWnd, nIndex, sizeof(WORD), FALSE ); }
/* @@ -1200,7 +1190,7 @@ int nIndex, LONG dwNewLong) { - PSTR lpStr = (PSTR)dwNewLong; + PSTR lpStr = (PSTR)(ULONG_PTR)dwNewLong; UNICODE_STRING Value = {0}; BOOL Allocated = FALSE; DWORD Ret; @@ -1223,7 +1213,7 @@ else Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value; + dwNewLong = (LONG_PTR)&Value; } else if (nIndex == GCW_ATOM && lpStr != NULL) { @@ -1241,7 +1231,7 @@ else Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value; + dwNewLong = (LONG_PTR)&Value; }
Ret = (DWORD)NtUserSetClassLong(hWnd, @@ -1267,7 +1257,7 @@ int nIndex, LONG dwNewLong) { - PWSTR lpStr = (PWSTR)dwNewLong; + PWSTR lpStr = (PWSTR)(ULONG_PTR)dwNewLong; UNICODE_STRING Value = {0};
TRACE("%p %d %lx\n", hWnd, nIndex, dwNewLong); @@ -1284,7 +1274,7 @@ else Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value; + dwNewLong = (LONG_PTR)&Value; } else if (nIndex == GCW_ATOM && lpStr != NULL) { @@ -1296,7 +1286,7 @@ else Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value; + dwNewLong = (LONG_PTR)&Value; }
return (DWORD)NtUserSetClassLong(hWnd, @@ -1352,6 +1342,30 @@ return (WORD) SetClassLongW ( hWnd, nIndex, wNewWord ); }
+/* + * @implemented + */ +WORD +WINAPI +SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord ) +{ + switch(nIndex) + { + case GWLP_ID: + case GWLP_HINSTANCE: + case GWLP_HWNDPARENT: + break; + default: + if (nIndex < 0) + { + WARN("Invalid offset %d\n", nIndex ); + SetLastError( ERROR_INVALID_INDEX ); + return 0; + } + break; + } + return NtUserSetWindowLong( hWnd, nIndex, wNewWord, FALSE ); +}
/* * @implemented @@ -1366,7 +1380,6 @@ return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, TRUE); }
- /* * @implemented */ @@ -1382,7 +1395,7 @@
#ifdef _WIN64 /* - * @unimplemented + * @implemented */ LONG_PTR WINAPI @@ -1390,12 +1403,11 @@ INT nIndex, LONG_PTR dwNewLong) { - UNIMPLEMENTED; - return 0; -} - -/* - * @unimplemented + return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE); +} + +/* + * @implemented */ LONG_PTR WINAPI @@ -1403,8 +1415,7 @@ INT nIndex, LONG_PTR dwNewLong) { - UNIMPLEMENTED; - return 0; + return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE); } #endif
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/clipboard.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -54,26 +54,26 @@ { HGLOBAL hGlobal = NULL; PVOID pGlobal = NULL; - DWORD size = 0; + DWORD_PTR size = 0;
/* dealing with bitmap object */ if (uFormat != CF_BITMAP) { - size = (DWORD)NtUserGetClipboardData(uFormat, NULL); + size = NtUserGetClipboardData(uFormat, NULL);
if (size) { hGlobal = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, size); pGlobal = GlobalLock(hGlobal);
- size = (DWORD)NtUserGetClipboardData(uFormat, pGlobal); + size = NtUserGetClipboardData(uFormat, pGlobal);
GlobalUnlock(hGlobal); } } else { - hGlobal = NtUserGetClipboardData(CF_BITMAP, NULL); + hGlobal = (HANDLE)NtUserGetClipboardData(CF_BITMAP, NULL); }
return hGlobal;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -159,7 +159,7 @@
SETDLGINFO( hWnd, dlgInfo );
- NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER ); + NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER ); } else { @@ -342,7 +342,7 @@ MulDiv(info.y, dlgInfo->yBaseUnit, 8), MulDiv(info.cx, dlgInfo->xBaseUnit, 4), MulDiv(info.cy, dlgInfo->yBaseUnit, 8), - hwnd, (HMENU)info.id, + hwnd, (HMENU)(ULONG_PTR)info.id, hInst, (LPVOID)info.data ); } else @@ -373,7 +373,7 @@ MulDiv(info.y, dlgInfo->yBaseUnit, 8), MulDiv(info.cx, dlgInfo->xBaseUnit, 4), MulDiv(info.cy, dlgInfo->yBaseUnit, 8), - hwnd, (HMENU)info.id, + hwnd, (HMENU)(ULONG_PTR)info.id, hInst, (LPVOID)info.data ); } else @@ -612,7 +612,7 @@ p++; break; case 0xffff: - result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 ); + result->menuName = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 ); p += 2; break; default: @@ -630,7 +630,7 @@ p++; break; case 0xffff: - result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 ); + result->className = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 ); p += 2; break; default:
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -441,12 +441,12 @@ if (NULL != CbtCreatewndExtra->Cs.lpszName) { Csw.lpszName = (LPCWSTR)((PCHAR) CbtCreatewndExtra - + (ULONG) CbtCreatewndExtra->Cs.lpszName); + + (ULONG_PTR) CbtCreatewndExtra->Cs.lpszName); } if (0 != HIWORD(CbtCreatewndExtra->Cs.lpszClass)) { Csw.lpszClass = (LPCWSTR)((PCHAR) CbtCreatewndExtra - + LOWORD((ULONG) CbtCreatewndExtra->Cs.lpszClass)); + + LOWORD((ULONG_PTR) CbtCreatewndExtra->Cs.lpszClass)); } wParam = Common->wParam; if (Common->Ansi)
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/menu.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -330,7 +330,7 @@ case (INT_PTR) HBMMENU_SYSTEM: if (0 != lpitem->dwItemData) { - Bmp = (HBITMAP) lpitem->dwItemData; + Bmp = (HBITMAP)(ULONG_PTR) lpitem->dwItemData; break; } /* fall through */ @@ -982,7 +982,7 @@ case WM_CREATE: { CREATESTRUCTA *cs = (CREATESTRUCTA *) lParam; - SetWindowLongPtrA(Wnd, 0, (LONG) cs->lpCreateParams); + SetWindowLongPtrA(Wnd, 0, (LONG_PTR)cs->lpCreateParams); return 0; }
@@ -1054,7 +1054,7 @@ case WM_CREATE: { CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam; - SetWindowLongPtrW(Wnd, 0, (LONG) cs->lpCreateParams); + SetWindowLongPtrW(Wnd, 0, (LONG_PTR)cs->lpCreateParams); return 0; }
@@ -1144,11 +1144,11 @@ resinfo = GET_WORD(res); res += sizeof(WORD); /* Align the text on a word boundary. */ - res += (~((int)res - 1)) & 1; + res += (~((UINT_PTR)res - 1)) & 1; mii.dwTypeData = (LPWSTR) res; res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR); /* Align the following fields on a dword boundary. */ - res += (~((int)res - 1)) & 3; + res += (~((UINT_PTR)res - 1)) & 3;
if (resinfo & 1) /* Pop-up? */ { @@ -1164,7 +1164,7 @@ } mii.fMask |= MIIM_SUBMENU; mii.fType |= MF_POPUP; - mii.wID = (UINT) mii.hSubMenu; + mii.wID = (UINT_PTR) mii.hSubMenu; } else if(!*mii.dwTypeData && !(mii.fType & MF_SEPARATOR)) { @@ -1218,9 +1218,9 @@ if(!(res = MENU_ParseResource(res, hSubMenu, unicode))) return NULL; if(!unicode) - AppendMenuA(hMenu, flags, (UINT)hSubMenu, str); + AppendMenuA(hMenu, flags, (UINT_PTR)hSubMenu, str); else - AppendMenuW(hMenu, flags, (UINT)hSubMenu, (LPCWSTR)str); + AppendMenuW(hMenu, flags, (UINT_PTR)hSubMenu, (LPCWSTR)str); } else /* Not a popup */ { @@ -3868,7 +3868,7 @@ { mii->fType |= MFT_OWNERDRAW; mii->fMask |= MIIM_DATA; - mii->dwItemData = (DWORD) NewItem; + mii->dwItemData = (DWORD_PTR) NewItem; } else if (Flags & MF_SEPARATOR) { @@ -4245,12 +4245,9 @@ HMENU WINAPI GetMenu(HWND hWnd) { - PWND Wnd = ValidateHwnd(hWnd); - - if (!Wnd) - return NULL; - - return (HMENU)Wnd->IDMenu; + HMENU retvalue = (HMENU)GetWindowLongPtrW( hWnd, GWLP_ID ); + TRACE("for %p returning %p\n", hWnd, retvalue); + return retvalue; }
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -163,19 +163,19 @@ { DdeLparam->Packed = TRUE; if (! UnpackDDElParam(UMMsg->message, UMMsg->lParam, - &DdeLparam->Value.Packed.uiLo, - &DdeLparam->Value.Packed.uiHi)) + (PUINT_PTR)&DdeLparam->Value.Packed.uiLo, + (PUINT_PTR)&DdeLparam->Value.Packed.uiHi)) { return FALSE; } if (0 != HIWORD(DdeLparam->Value.Packed.uiHi)) { /* uiHi should contain a hMem from WM_DDE_EXECUTE */ - HGLOBAL h = DdeGetPair((HGLOBAL) DdeLparam->Value.Packed.uiHi); + HGLOBAL h = DdeGetPair((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi); if (NULL != h) { - GlobalFree((HGLOBAL) DdeLparam->Value.Packed.uiHi); - DdeLparam->Value.Packed.uiHi = (UINT) h; + GlobalFree((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi); + DdeLparam->Value.Packed.uiHi = (UINT_PTR) h; } } FreeDDElParam(UMMsg->message, UMMsg->lParam); @@ -685,7 +685,7 @@ return FALSE; } CsA->lpszName = AnsiString.Buffer; - if (HIWORD((ULONG)CsW->lpszClass) != 0) + if (HIWORD((ULONG_PTR)CsW->lpszClass) != 0) { RtlInitUnicodeString(&UnicodeString, CsW->lpszClass); Status = RtlUnicodeStringToAnsiString(&AnsiString, &UnicodeString, TRUE); @@ -849,7 +849,7 @@ Cs = (CREATESTRUCTA*) AnsiMsg->lParam; RtlInitAnsiString(&AnsiString, Cs->lpszName); RtlFreeAnsiString(&AnsiString); - if (HIWORD((ULONG)Cs->lpszClass) != 0) + if (HIWORD((ULONG_PTR)Cs->lpszClass) != 0) { RtlInitAnsiString(&AnsiString, Cs->lpszClass); RtlFreeAnsiString(&AnsiString); @@ -946,7 +946,7 @@ MSG UnicodeMsg; MSG AnsiMsg; PMSG FinalMsg; - ULONG LParamSize; + SIZE_T LParamSize; } MSGCONVERSION, *PMSGCONVERSION;
static PMSGCONVERSION MsgConversions = NULL; @@ -2397,7 +2397,7 @@ * @implemented */ BOOL WINAPI -TranslateMessageEx(CONST MSG *lpMsg, DWORD unk) +TranslateMessageEx(CONST MSG *lpMsg, UINT Flags) { switch (lpMsg->message) { @@ -2405,7 +2405,7 @@ case WM_KEYUP: case WM_SYSKEYDOWN: case WM_SYSKEYUP: - return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk)); + return(NtUserTranslateMessage((LPMSG)lpMsg, Flags));
default: if ( lpMsg->message & ~WM_MAXIMUM )
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/messagebox.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -423,7 +423,7 @@ }
/* create static for text */ - dest = (BYTE*)(((DWORD)dest + 3) & ~3); + dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3); itxt = (DLGITEMTEMPLATE *)dest; itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX; if(lpMsgBoxParams->dwStyle & MB_RIGHT) @@ -450,7 +450,7 @@ btnrect.left = btnrect.top = 0; for(i = 0; i < nButtons; i++) { - dest = (BYTE*)(((DWORD)dest + 3) & ~3); + dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3); ibtn[i] = (DLGITEMTEMPLATE *)dest; ibtn[i]->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP; if(!defbtn && (i == ((lpMsgBoxParams->dwStyle & MB_DEFMASK) >> 8))) @@ -699,7 +699,7 @@ UNICODE_STRING textW, captionW, iconW; int ret;
- if (HIWORD((UINT)lpMsgBoxParams->lpszText)) + if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText)) { RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpMsgBoxParams->lpszText); /* @@ -711,7 +711,7 @@ else textW.Buffer = (LPWSTR)lpMsgBoxParams->lpszText;
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption)) + if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption)) { RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpMsgBoxParams->lpszCaption); /* @@ -725,7 +725,7 @@
if(lpMsgBoxParams->dwStyle & MB_USERICON) { - if (HIWORD((UINT)lpMsgBoxParams->lpszIcon)) + if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszIcon)) { RtlCreateUnicodeStringFromAsciiz(&iconW, (PCSZ)lpMsgBoxParams->lpszIcon); /* @@ -753,13 +753,13 @@
ret = MessageBoxTimeoutIndirectW(&msgboxW, (UINT)-1);
- if (HIWORD((UINT)lpMsgBoxParams->lpszText)) + if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText)) RtlFreeUnicodeString(&textW);
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption)) + if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption)) RtlFreeUnicodeString(&captionW);
- if ((lpMsgBoxParams->dwStyle & MB_USERICON) && HIWORD((UINT)iconW.Buffer)) + if ((lpMsgBoxParams->dwStyle & MB_USERICON) && HIWORD((UINT_PTR)iconW.Buffer)) RtlFreeUnicodeString(&iconW);
return ret; @@ -809,12 +809,12 @@ UNICODE_STRING textW, captionW; int ret;
- if (HIWORD((UINT)lpText)) + if (HIWORD((UINT_PTR)lpText)) RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpText); else textW.Buffer = (LPWSTR)lpText;
- if (HIWORD((UINT)lpCaption)) + if (HIWORD((UINT_PTR)lpCaption)) RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpCaption); else captionW.Buffer = (LPWSTR)lpCaption;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/nonclient.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -123,13 +123,13 @@ { HICON hIcon = 0;
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon) hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/prop.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/prop.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/prop.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -377,7 +377,7 @@ } else { - Atom = LOWORD((DWORD)lpString); + Atom = LOWORD((DWORD_PTR)lpString); } Prop = IntGetProp(hWnd, Atom); if (Prop != NULL) Data = Prop->Data; @@ -428,7 +428,7 @@ } else { - Atom = LOWORD((DWORD)lpString); + Atom = LOWORD((DWORD_PTR)lpString); } return(NtUserRemoveProp(hWnd, Atom)); } @@ -476,7 +476,7 @@ } else { - Atom = LOWORD((DWORD)lpString); + Atom = LOWORD((DWORD_PTR)lpString); }
return(NtUserSetProp(hWnd, Atom, hData));
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/spy.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -2010,7 +2010,7 @@ /* save and restore error code over the next call */ save_error = GetLastError(); /* special code to detect a property sheet dialog */ - if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOG) && + if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (ULONG_PTR)WC_DIALOG) && (GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) { strcpyW(sp_e->wnd_class, WC_PROPSHEETW); }
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/window.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Sat Nov 7 01:10:56 2009 @@ -145,7 +145,7 @@ { SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
- return (BOOL)(hWnd); + return HandleToUlong(hWnd); }
@@ -346,7 +346,7 @@
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id; + if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP)) { @@ -458,7 +458,7 @@
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id; + if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP)) { @@ -618,7 +618,7 @@ * Once that's fixed, we shouldn't have to check for a NULL HWND * here */ - if (!(ULONG)pHwnd[i]) /* don't enumerate a NULL HWND */ + if (!pHwnd[i]) /* don't enumerate a NULL HWND */ continue; if (!(*lpfn)(pHwnd[i], lParam)) { @@ -1343,8 +1343,8 @@ { // We are current. //FIXME("Current!\n"); if (lpdwProcessId) - *lpdwProcessId = (DWORD)NtCurrentTeb()->ClientId.UniqueProcess; - Ret = (DWORD)NtCurrentTeb()->ClientId.UniqueThread; + *lpdwProcessId = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess; + Ret = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueThread; } else { // Ask kernel for info.