Fix user32 build mostly tested in trunk. Some local changes still not committed.

svn path=/branches/ros-amd64-bringup/; revision=43992
This commit is contained in:
Samuel Serapion
2009-11-07 00:10:56 +00:00
parent 37df53da63
commit 32acc78401
12 changed files with 111 additions and 103 deletions
+1 -1
View File
@@ -65,5 +65,5 @@ User32CreateWindowEx(DWORD dwExStyle,
BOOL Unicode);
HWND* WIN_ListChildren (HWND hWndparent);
ULONG_PTR FASTCALL IntGetWndProc(PWND, BOOL);
WNDPROC FASTCALL IntGetWndProc(PWND, BOOL);
DWORD WINAPI GetRealWindowOwner(HWND);
+54 -43
View File
@@ -266,11 +266,11 @@ IntGetClsWndProc(PWND pWnd, PCLS Class, BOOL Ansi)
//
// 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 @@ IntGetWndProc(PWND pWnd, BOOL Ansi)
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 @@ IntGetWndProc(PWND pWnd, BOOL Ansi)
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 @@ GetClassWord(
}
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 @@ LONG
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 @@ LONG
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 );
return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), FALSE );
}
/*
* @unimplemented
* @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 @@ GetWindowWord(HWND hWnd, int nIndex)
}
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 @@ SetClassLongA (HWND hWnd,
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 @@ SetClassLongA (HWND hWnd,
else
Value.Buffer = (PWSTR)lpStr;
dwNewLong = (LONG)&Value;
dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
@@ -1241,7 +1231,7 @@ SetClassLongA (HWND hWnd,
else
Value.Buffer = (PWSTR)lpStr;
dwNewLong = (LONG)&Value;
dwNewLong = (LONG_PTR)&Value;
}
Ret = (DWORD)NtUserSetClassLong(hWnd,
@@ -1267,7 +1257,7 @@ SetClassLongW(HWND hWnd,
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 @@ SetClassLongW(HWND hWnd,
else
Value.Buffer = lpStr;
dwNewLong = (LONG)&Value;
dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
@@ -1296,7 +1286,7 @@ SetClassLongW(HWND hWnd,
else
Value.Buffer = lpStr;
dwNewLong = (LONG)&Value;
dwNewLong = (LONG_PTR)&Value;
}
return (DWORD)NtUserSetClassLong(hWnd,
@@ -1352,6 +1342,30 @@ SetClassWord(
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 @@ SetWindowLongA(
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, TRUE);
}
/*
* @implemented
*/
@@ -1382,7 +1395,7 @@ SetWindowLongW(
#ifdef _WIN64
/*
* @unimplemented
* @implemented
*/
LONG_PTR
WINAPI
@@ -1390,12 +1403,11 @@ SetWindowLongPtrA(HWND hWnd,
INT nIndex,
LONG_PTR dwNewLong)
{
UNIMPLEMENTED;
return 0;
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
}
/*
* @unimplemented
* @implemented
*/
LONG_PTR
WINAPI
@@ -1403,8 +1415,7 @@ SetWindowLongPtrW(HWND hWnd,
INT nIndex,
LONG_PTR dwNewLong)
{
UNIMPLEMENTED;
return 0;
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
}
#endif
+4 -4
View File
@@ -54,26 +54,26 @@ GetClipboardData(UINT uFormat)
{
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;
+5 -5
View File
@@ -159,7 +159,7 @@ DIALOGINFO * DIALOG_get_info( HWND hWnd, BOOL create )
SETDLGINFO( hWnd, dlgInfo );
NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
}
else
{
@@ -342,7 +342,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
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 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
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 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
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 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
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:
+2 -2
View File
@@ -441,12 +441,12 @@ User32CallHookProcFromKernel(PVOID Arguments, ULONG ArgumentLength)
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)
+12 -15
View File
@@ -330,7 +330,7 @@ MenuGetBitmapItemSize(PROSMENUITEMINFO lpitem, SIZE *Size, HWND WndOwner)
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 @@ PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
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 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
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 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
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 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
}
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 @@ static LPCSTR MENU_ParseResource( LPCSTR res, HMENU hMenu, BOOL unicode )
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 @@ MenuSetItemData(
{
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 @@ EndMenu(VOID)
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;
}
+10 -10
View File
@@ -163,19 +163,19 @@ MsgiUMToKMMessage(PMSG UMMsg, PMSG KMMsg, BOOL Posted)
{
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 @@ MsgiUnicodeToAnsiMessage(LPMSG AnsiMsg, LPMSG UnicodeMsg)
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 @@ MsgiUnicodeToAnsiCleanup(LPMSG AnsiMsg, LPMSG UnicodeMsg)
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 @@ typedef struct tagMSGCONVERSION
MSG UnicodeMsg;
MSG AnsiMsg;
PMSG FinalMsg;
ULONG LParamSize;
SIZE_T LParamSize;
} MSGCONVERSION, *PMSGCONVERSION;
static PMSGCONVERSION MsgConversions = NULL;
@@ -2397,7 +2397,7 @@ SendNotifyMessageW(
* @implemented
*/
BOOL WINAPI
TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
TranslateMessageEx(CONST MSG *lpMsg, UINT Flags)
{
switch (lpMsg->message)
{
@@ -2405,7 +2405,7 @@ TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
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 )
+10 -10
View File
@@ -423,7 +423,7 @@ MessageBoxTimeoutIndirectW(
}
/* 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 @@ MessageBoxTimeoutIndirectW(
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 @@ MessageBoxIndirectA(
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 @@ MessageBoxIndirectA(
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 @@ MessageBoxIndirectA(
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 @@ MessageBoxIndirectA(
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 @@ MessageBoxTimeoutA(
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;
+3 -3
View File
@@ -123,13 +123,13 @@ UserGetWindowIcon(HWND hwnd)
{
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);
+3 -3
View File
@@ -377,7 +377,7 @@ GetPropW(HWND hWnd, LPCWSTR lpString)
}
else
{
Atom = LOWORD((DWORD)lpString);
Atom = LOWORD((DWORD_PTR)lpString);
}
Prop = IntGetProp(hWnd, Atom);
if (Prop != NULL) Data = Prop->Data;
@@ -428,7 +428,7 @@ RemovePropW(HWND hWnd,
}
else
{
Atom = LOWORD((DWORD)lpString);
Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserRemoveProp(hWnd, Atom));
}
@@ -476,7 +476,7 @@ SetPropW(HWND hWnd, LPCWSTR lpString, HANDLE hData)
}
else
{
Atom = LOWORD((DWORD)lpString);
Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserSetProp(hWnd, Atom, hData));
+1 -1
View File
@@ -2010,7 +2010,7 @@ static void SPY_GetClassName( SPY_INSTANCE *sp_e )
/* 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);
}
+6 -6
View File
@@ -145,7 +145,7 @@ CloseWindow(HWND hWnd)
{
SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
return (BOOL)(hWnd);
return HandleToUlong(hWnd);
}
@@ -346,7 +346,7 @@ CreateWindowExA(DWORD dwExStyle,
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 @@ CreateWindowExW(DWORD dwExStyle,
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 @@ User32EnumWindows(HDESK hDesktop,
* 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 @@ GetWindowThreadProcessId(HWND hWnd,
{ // 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.