Commit bbdac5e4 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

GetWindowLong -> GetWindowLongPtr.

parent 0ee1407d
...@@ -463,7 +463,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol ) ...@@ -463,7 +463,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
} }
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 8); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 8);
hInst = GetWindowLongA(HWND_32(lpChCol->hwndOwner), GWL_HINSTANCE); hInst = GetWindowLongPtrA(HWND_32(lpChCol->hwndOwner), GWLP_HINSTANCE);
bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChCol->hwndOwner, bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChCol->hwndOwner,
(DLGPROC16) ptr, (DWORD)lpChCol); (DLGPROC16) ptr, (DWORD)lpChCol);
if (hResource16) FreeResource16(hDlgTmpl16); if (hResource16) FreeResource16(hDlgTmpl16);
......
...@@ -3635,7 +3635,7 @@ static BOOL GetFileName31A(LPOPENFILENAMEA lpofn, /* addess of structure with da ...@@ -3635,7 +3635,7 @@ static BOOL GetFileName31A(LPOPENFILENAMEA lpofn, /* addess of structure with da
lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE); lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE);
if (lfs) if (lfs)
{ {
hInst = (HINSTANCE)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); hInst = (HINSTANCE)GetWindowLongPtrA( lpofn->hwndOwner, GWLP_HINSTANCE );
bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner, bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner,
FD32_FileOpenDlgProc, (LPARAM)lfs); FD32_FileOpenDlgProc, (LPARAM)lfs);
FD31_DestroyPrivate(lfs); FD31_DestroyPrivate(lfs);
...@@ -3665,7 +3665,7 @@ static BOOL GetFileName31W(LPOPENFILENAMEW lpofn, /* addess of structure with da ...@@ -3665,7 +3665,7 @@ static BOOL GetFileName31W(LPOPENFILENAMEW lpofn, /* addess of structure with da
lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE); lfs = FD31_AllocPrivate((LPARAM) lpofn, dlgType, &callbacks, (DWORD) FALSE);
if (lfs) if (lfs)
{ {
hInst = (HINSTANCE)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE ); hInst = (HINSTANCE)GetWindowLongPtrW( lpofn->hwndOwner, GWLP_HINSTANCE );
bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner, bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner,
FD32_FileOpenDlgProc, (LPARAM)lfs); FD32_FileOpenDlgProc, (LPARAM)lfs);
FD31_DestroyPrivate(lfs); FD31_DestroyPrivate(lfs);
......
...@@ -459,7 +459,7 @@ BOOL16 WINAPI GetOpenFileName16( ...@@ -459,7 +459,7 @@ BOOL16 WINAPI GetOpenFileName16(
if (lfs) if (lfs)
{ {
priv = (PFD16_PRIVATE) lfs->private1632; priv = (PFD16_PRIVATE) lfs->private1632;
hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE ); hInst = GetWindowLongPtrA( HWND_32(lpofn->hwndOwner), GWLP_HINSTANCE );
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner, bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner,
(DLGPROC16) ptr, (LPARAM) lfs); (DLGPROC16) ptr, (LPARAM) lfs);
...@@ -501,7 +501,7 @@ BOOL16 WINAPI GetSaveFileName16( ...@@ -501,7 +501,7 @@ BOOL16 WINAPI GetSaveFileName16(
if (lfs) if (lfs)
{ {
priv = (PFD16_PRIVATE) lfs->private1632; priv = (PFD16_PRIVATE) lfs->private1632;
hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE ); hInst = GetWindowLongPtrA( HWND_32(lpofn->hwndOwner), GWLP_HINSTANCE );
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner, bRet = DialogBoxIndirectParam16( hInst, priv->hDlgTmpl16, lpofn->hwndOwner,
(DLGPROC16) ptr, (LPARAM) lfs); (DLGPROC16) ptr, (LPARAM) lfs);
......
...@@ -182,7 +182,7 @@ HWND16 WINAPI FindText16( SEGPTR find ) ...@@ -182,7 +182,7 @@ HWND16 WINAPI FindText16( SEGPTR find )
lfr->find = TRUE; lfr->find = TRUE;
if (FINDDLG_Get16BitsTemplate(lfr)) if (FINDDLG_Get16BitsTemplate(lfr))
{ {
hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE); hInst = GetWindowLongPtrA( HWND_32(lfr->fr16->hwndOwner), GWLP_HINSTANCE);
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 13); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 13);
ret = CreateDialogIndirectParam16( hInst, lfr->template, ret = CreateDialogIndirectParam16( hInst, lfr->template,
lfr->fr16->hwndOwner, (DLGPROC16) ptr, find); lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);
...@@ -212,7 +212,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find ) ...@@ -212,7 +212,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
lfr->find = FALSE; lfr->find = FALSE;
if (FINDDLG_Get16BitsTemplate(lfr)) if (FINDDLG_Get16BitsTemplate(lfr))
{ {
hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE); hInst = GetWindowLongPtrA( HWND_32(lfr->fr16->hwndOwner), GWLP_HINSTANCE);
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 14); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 14);
ret = CreateDialogIndirectParam16( hInst, lfr->template, ret = CreateDialogIndirectParam16( hInst, lfr->template,
lfr->fr16->hwndOwner, (DLGPROC16) ptr, find); lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);
......
...@@ -231,7 +231,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont) ...@@ -231,7 +231,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
lpChFont->lpTemplateName=(SEGPTR)&cf32a; lpChFont->lpTemplateName=(SEGPTR)&cf32a;
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 16); ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 16);
hInst = GetWindowLongA(HWND_32(lpChFont->hwndOwner), GWL_HINSTANCE); hInst = GetWindowLongPtrA(HWND_32(lpChFont->hwndOwner), GWLP_HINSTANCE);
bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChFont->hwndOwner, bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChFont->hwndOwner,
(DLGPROC16) ptr, (DWORD)lpChFont); (DLGPROC16) ptr, (DWORD)lpChFont);
if (hResource16) FreeResource16(hDlgTmpl16); if (hResource16) FreeResource16(hDlgTmpl16);
......
...@@ -1979,7 +1979,7 @@ BOOL WINAPI PrintDlgA( ...@@ -1979,7 +1979,7 @@ BOOL WINAPI PrintDlgA(
{ {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE ); HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrA( lppd->hwndOwner, GWLP_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
...@@ -2135,7 +2135,7 @@ BOOL WINAPI PrintDlgW( ...@@ -2135,7 +2135,7 @@ BOOL WINAPI PrintDlgW(
{ {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE hInst = (HINSTANCE)GetWindowLongW( lppd->hwndOwner, GWL_HINSTANCE ); HINSTANCE hInst = (HINSTANCE)GetWindowLongPtrW( lppd->hwndOwner, GWLP_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
......
...@@ -345,7 +345,7 @@ BOOL16 WINAPI PrintDlg16( ...@@ -345,7 +345,7 @@ BOOL16 WINAPI PrintDlg16(
) { ) {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE16 hInst = GetWindowWord( HWND_32(lppd->hwndOwner), GWL_HINSTANCE ); HINSTANCE16 hInst = GetWindowLongPtrW( HWND_32(lppd->hwndOwner), GWLP_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
......
...@@ -260,7 +260,7 @@ static HRESULT WINAPI IAutoComplete_fnInit( ...@@ -260,7 +260,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, hwndParent, NULL,
(HINSTANCE)GetWindowLongA( hwndParent, GWL_HINSTANCE ), NULL); (HINSTANCE)GetWindowLongPtrW( hwndParent, GWLP_HINSTANCE ), NULL);
if (This->hwndListBox) { if (This->hwndListBox) {
This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc); This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc);
......
...@@ -109,8 +109,8 @@ void WINAPI RunFileDlg( ...@@ -109,8 +109,8 @@ void WINAPI RunFileDlg(
return; return;
} }
DialogBoxIndirectParamA((HINSTANCE)GetWindowLongA( hwndOwner, DialogBoxIndirectParamA((HINSTANCE)GetWindowLongPtrW( hwndOwner,
GWL_HINSTANCE ), GWLP_HINSTANCE ),
template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); template, hwndOwner, RunDlgProc, (LPARAM)&rfdp);
} }
......
...@@ -854,7 +854,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, ...@@ -854,7 +854,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 ); SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 );
info.hFont = CreateFontIndirectW( &logFont ); info.hFont = CreateFontIndirectW( &logFont );
bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongW( hWnd, GWL_HINSTANCE ), bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ),
template, hWnd, AboutDlgProc, (LPARAM)&info ); template, hWnd, AboutDlgProc, (LPARAM)&info );
DeleteObject(info.hFont); DeleteObject(info.hFont);
return bRet; return bRet;
......
...@@ -1532,7 +1532,7 @@ static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, L ...@@ -1532,7 +1532,7 @@ static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, L
static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
{ {
IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongA(hWnd, GWL_USERDATA); IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
LPCREATESTRUCTA lpcs; LPCREATESTRUCTA lpcs;
TRACE("(hwnd=%p msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam); TRACE("(hwnd=%p msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam);
...@@ -1542,7 +1542,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara ...@@ -1542,7 +1542,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
case WM_NCCREATE: case WM_NCCREATE:
lpcs = (LPCREATESTRUCTA)lParam; lpcs = (LPCREATESTRUCTA)lParam;
pThis = (IShellViewImpl*)(lpcs->lpCreateParams); pThis = (IShellViewImpl*)(lpcs->lpCreateParams);
SetWindowLongA(hWnd, GWL_USERDATA, (LONG)pThis); SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis);
pThis->hWnd = hWnd; /*set the window handle*/ pThis->hWnd = hWnd; /*set the window handle*/
break; break;
......
...@@ -196,7 +196,7 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, ...@@ -196,7 +196,7 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template,
SendMessageA( hwndDefButton, BM_SETSTYLE, SendMessageA( hwndDefButton, BM_SETSTYLE,
BS_PUSHBUTTON,FALSE ); BS_PUSHBUTTON,FALSE );
hwndDefButton = hwndCtrl; hwndDefButton = hwndCtrl;
dlgInfo->idResult = GetWindowLongA( hwndCtrl, GWL_ID ); dlgInfo->idResult = GetWindowLongPtrA( hwndCtrl, GWLP_ID );
} }
} }
TRACE(" END\n" ); TRACE(" END\n" );
......
...@@ -1452,12 +1452,12 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar ...@@ -1452,12 +1452,12 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
/* now call the window procedure */ /* now call the window procedure */
if (unicode) if (unicode)
{ {
if (!(winproc = (WNDPROC)GetWindowLongW( hwnd, GWL_WNDPROC ))) goto done; if (!(winproc = (WNDPROC)GetWindowLongPtrW( hwnd, GWLP_WNDPROC ))) goto done;
result = CallWindowProcW( winproc, hwnd, msg, wparam, lparam ); result = CallWindowProcW( winproc, hwnd, msg, wparam, lparam );
} }
else else
{ {
if (!(winproc = (WNDPROC)GetWindowLongA( hwnd, GWL_WNDPROC ))) goto done; if (!(winproc = (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ))) goto done;
result = CallWindowProcA( winproc, hwnd, msg, wparam, lparam ); result = CallWindowProcA( winproc, hwnd, msg, wparam, lparam );
} }
......
...@@ -64,7 +64,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM ...@@ -64,7 +64,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
} }
} }
if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWL_WNDPROC ))) return 0; if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0;
SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wparam, lparam ); SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wparam, lparam );
result = CallWindowProc16( (WNDPROC16)winproc, hwnd16, msg, wparam, lparam ); result = CallWindowProc16( (WNDPROC16)winproc, hwnd16, msg, wparam, lparam );
......
...@@ -80,7 +80,7 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data ) ...@@ -80,7 +80,7 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
X11DRV_register_window( display, hwnd, win->pDriverData ); X11DRV_register_window( display, hwnd, win->pDriverData );
WIN_ReleasePtr( win ); WIN_ReleasePtr( win );
SetWindowLongW( hwnd, GWL_WNDPROC, (LONG)desktop_winproc ); SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)desktop_winproc );
wine_tsx11_lock(); wine_tsx11_lock();
XChangeProperty ( display, root_window, x11drv_atom(WM_PROTOCOLS), XChangeProperty ( display, root_window, x11drv_atom(WM_PROTOCOLS),
XA_ATOM, 32, PropModeReplace, (char *)&atom, 1 ); XA_ATOM, 32, PropModeReplace, (char *)&atom, 1 );
......
...@@ -1282,7 +1282,7 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent ) ...@@ -1282,7 +1282,7 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent )
{ {
if (!(wndPtr->dwStyle & WS_CHILD)) if (!(wndPtr->dwStyle & WS_CHILD))
{ {
HMENU menu = (HMENU)SetWindowLongW( hwnd, GWL_ID, 0 ); HMENU menu = (HMENU)SetWindowLongPtrW( hwnd, GWLP_ID, 0 );
if (menu) DestroyMenu( menu ); if (menu) DestroyMenu( menu );
} }
} }
......
...@@ -108,15 +108,13 @@ static void GrabPointer(BOOL grab) ...@@ -108,15 +108,13 @@ static void GrabPointer(BOOL grab)
if(!X11DRV_DD_GrabMessage) if(!X11DRV_DD_GrabMessage)
X11DRV_DD_GrabMessage = RegisterWindowMessageA("WINE_X11DRV_GRABPOINTER"); X11DRV_DD_GrabMessage = RegisterWindowMessageA("WINE_X11DRV_GRABPOINTER");
/* FIXME: Replace with SetWindowLongPtrA when available */ X11DRV_DD_GrabOldProcedure = (WNDPROC)SetWindowLongPtrA(X11DRV_DD_PrimaryWnd,
X11DRV_DD_GrabOldProcedure = (WNDPROC)SetWindowLongA(X11DRV_DD_PrimaryWnd, GWLP_WNDPROC, (LONG_PTR)GrabWndProc);
GWL_WNDPROC, (LONG)GrabWndProc);
SendMessageA(X11DRV_DD_PrimaryWnd, X11DRV_DD_GrabMessage, grab ? 1 : 0, 0); SendMessageA(X11DRV_DD_PrimaryWnd, X11DRV_DD_GrabMessage, grab ? 1 : 0, 0);
/* FIXME: Replace with SetWindowLongPtrA when available */ if(SetWindowLongPtrA(X11DRV_DD_PrimaryWnd, GWLP_WNDPROC,
if(SetWindowLongA(X11DRV_DD_PrimaryWnd, GWL_WNDPROC, (LONG_PTR)X11DRV_DD_GrabOldProcedure) != (LONG_PTR)GrabWndProc)
(LONG)X11DRV_DD_GrabOldProcedure) != (LONG)GrabWndProc)
ERR("Window procedure has been changed!\n"); ERR("Window procedure has been changed!\n");
} }
......
...@@ -621,7 +621,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa ...@@ -621,7 +621,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
UINT len; UINT len;
HICON hIcon = (HICON)GetClassLongW( hwnd, GCL_HICON ); HICON hIcon = (HICON)GetClassLongW( hwnd, GCL_HICON );
HINSTANCE instance = (HINSTANCE)GetWindowLongW( hwnd, GWL_HINSTANCE ); HINSTANCE instance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE );
if (hIcon) return (LRESULT)hIcon; if (hIcon) return (LRESULT)hIcon;
for(len=1; len<64; len++) for(len=1; len<64; len++)
if((hIcon = LoadIconW(instance, MAKEINTRESOURCEW(len)))) if((hIcon = LoadIconW(instance, MAKEINTRESOURCEW(len))))
......
...@@ -360,7 +360,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL ...@@ -360,7 +360,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
if (hwndDefButton) if (hwndDefButton)
SendMessageA( hwndDefButton, BM_SETSTYLE, BS_PUSHBUTTON, FALSE ); SendMessageA( hwndDefButton, BM_SETSTYLE, BS_PUSHBUTTON, FALSE );
hwndDefButton = hwndCtrl; hwndDefButton = hwndCtrl;
dlgInfo->idResult = GetWindowLongA( hwndCtrl, GWL_ID ); dlgInfo->idResult = GetWindowLongPtrA( hwndCtrl, GWLP_ID );
} }
} }
TRACE(" END\n" ); TRACE(" END\n" );
...@@ -1219,7 +1219,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg ) ...@@ -1219,7 +1219,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
*/ */
INT WINAPI GetDlgCtrlID( HWND hwnd ) INT WINAPI GetDlgCtrlID( HWND hwnd )
{ {
return GetWindowLongW( hwnd, GWL_ID ); return GetWindowLongPtrW( hwnd, GWLP_ID );
} }
...@@ -1234,7 +1234,7 @@ HWND WINAPI GetDlgItem( HWND hwndDlg, INT id ) ...@@ -1234,7 +1234,7 @@ HWND WINAPI GetDlgItem( HWND hwndDlg, INT id )
if (!list) return 0; if (!list) return 0;
for (i = 0; list[i]; i++) if (GetWindowLongW( list[i], GWL_ID ) == id) break; for (i = 0; list[i]; i++) if (GetWindowLongPtrW( list[i], GWLP_ID ) == id) break;
ret = list[i]; ret = list[i];
HeapFree( GetProcessHeap(), 0, list ); HeapFree( GetProcessHeap(), 0, list );
return ret; return ret;
...@@ -1378,7 +1378,7 @@ UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id ) ...@@ -1378,7 +1378,7 @@ UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id )
*/ */
static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam) static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam)
{ {
LONG lChildID = GetWindowLongA(hwndChild, GWL_ID); LONG lChildID = GetWindowLongPtrW(hwndChild, GWLP_ID);
RADIOGROUP *lpRadioGroup = (RADIOGROUP *) lParam; RADIOGROUP *lpRadioGroup = (RADIOGROUP *) lParam;
if ((lChildID >= lpRadioGroup->firstID) && if ((lChildID >= lpRadioGroup->firstID) &&
...@@ -1386,11 +1386,11 @@ static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam) ...@@ -1386,11 +1386,11 @@ static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam)
{ {
if (lChildID == lpRadioGroup->checkID) if (lChildID == lpRadioGroup->checkID)
{ {
SendMessageA(hwndChild, BM_SETCHECK, BST_CHECKED, 0); SendMessageW(hwndChild, BM_SETCHECK, BST_CHECKED, 0);
} }
else else
{ {
SendMessageA(hwndChild, BM_SETCHECK, BST_UNCHECKED, 0); SendMessageW(hwndChild, BM_SETCHECK, BST_UNCHECKED, 0);
} }
} }
......
...@@ -152,7 +152,7 @@ static HWND MDI_GetChildByID(HWND hwnd, UINT id, MDICLIENTINFO *ci) ...@@ -152,7 +152,7 @@ static HWND MDI_GetChildByID(HWND hwnd, UINT id, MDICLIENTINFO *ci)
for (i = 0; ci->nActiveChildren; i++) for (i = 0; ci->nActiveChildren; i++)
{ {
if (GetWindowLongW( ci->child[i], GWL_ID ) == id) if (GetWindowLongPtrW( ci->child[i], GWLP_ID ) == id)
return ci->child[i]; return ci->child[i];
} }
return 0; return 0;
...@@ -430,7 +430,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci) ...@@ -430,7 +430,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
visible++; visible++;
SetWindowLongW(ci->child[i], GWL_ID, id); SetWindowLongPtrW(ci->child[i], GWLP_ID, id);
buf[0] = '&'; buf[0] = '&';
buf[1] = '0' + visible; buf[1] = '0' + visible;
......
...@@ -288,7 +288,7 @@ static BOOL process_cooked_keyboard_message( MSG *msg, BOOL remove ) ...@@ -288,7 +288,7 @@ static BOOL process_cooked_keyboard_message( MSG *msg, BOOL remove )
HELPINFO hi; HELPINFO hi;
hi.cbSize = sizeof(HELPINFO); hi.cbSize = sizeof(HELPINFO);
hi.iContextType = HELPINFO_WINDOW; hi.iContextType = HELPINFO_WINDOW;
hi.iCtrlId = GetWindowLongA( msg->hwnd, GWL_ID ); hi.iCtrlId = GetWindowLongPtrA( msg->hwnd, GWLP_ID );
hi.hItemHandle = msg->hwnd; hi.hItemHandle = msg->hwnd;
hi.dwContextId = GetWindowContextHelpId( msg->hwnd ); hi.dwContextId = GetWindowContextHelpId( msg->hwnd );
hi.MousePos = msg->pt; hi.MousePos = msg->pt;
...@@ -499,7 +499,7 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r ...@@ -499,7 +499,7 @@ static BOOL process_cooked_mouse_message( MSG *msg, ULONG_PTR extra_info, BOOL r
/*********************************************************************** /***********************************************************************
* process_hardware_message * MSG_process_raw_hardware_message
* *
* returns TRUE if the contents of 'msg' should be passed to the application * returns TRUE if the contents of 'msg' should be passed to the application
*/ */
......
...@@ -361,7 +361,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd, ...@@ -361,7 +361,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack); context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack);
context.SegFs = wine_get_fs(); context.SegFs = wine_get_fs();
context.SegGs = wine_get_gs(); context.SegGs = wine_get_gs();
if (!(context.Eax = GetWindowWord( HWND_32(hwnd), GWL_HINSTANCE ))) context.Eax = context.SegDs; if (!(context.Eax = GetWindowWord( HWND_32(hwnd), GWLP_HINSTANCE ))) context.Eax = context.SegDs;
context.SegCs = SELECTOROF(proc); context.SegCs = SELECTOROF(proc);
context.Eip = OFFSETOF(proc); context.Eip = OFFSETOF(proc);
context.Ebp = OFFSETOF(teb->cur_stack) context.Ebp = OFFSETOF(teb->cur_stack)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment