Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bbdac5e4
Commit
bbdac5e4
authored
Sep 22, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetWindowLong -> GetWindowLongPtr.
parent
0ee1407d
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
95 additions
and
97 deletions
+95
-97
colordlg16.c
dlls/commdlg/colordlg16.c
+1
-1
filedlg.c
dlls/commdlg/filedlg.c
+2
-2
filedlg16.c
dlls/commdlg/filedlg16.c
+2
-2
finddlg.c
dlls/commdlg/finddlg.c
+2
-2
fontdlg16.c
dlls/commdlg/fontdlg16.c
+1
-1
printdlg.c
dlls/commdlg/printdlg.c
+2
-2
printdlg16.c
dlls/commdlg/printdlg16.c
+1
-1
autocomplete.c
dlls/shell32/autocomplete.c
+1
-1
dialogs.c
dlls/shell32/dialogs.c
+2
-2
shell32_main.c
dlls/shell32/shell32_main.c
+1
-1
shlview.c
dlls/shell32/shlview.c
+2
-2
dialog16.c
dlls/user/dialog16.c
+1
-1
message.c
dlls/user/message.c
+2
-2
msg16.c
dlls/user/msg16.c
+1
-1
desktop.c
dlls/x11drv/desktop.c
+1
-1
window.c
dlls/x11drv/window.c
+1
-1
x11ddraw.c
dlls/x11drv/x11ddraw.c
+4
-6
defwnd.c
windows/defwnd.c
+1
-1
dialog.c
windows/dialog.c
+6
-6
mdi.c
windows/mdi.c
+2
-2
message.c
windows/message.c
+2
-2
win.c
windows/win.c
+56
-56
winproc.c
windows/winproc.c
+1
-1
No files found.
dlls/commdlg/colordlg16.c
View file @
bbdac5e4
...
...
@@ -463,7 +463,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
}
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
8
);
hInst
=
GetWindowLong
A
(
HWND_32
(
lpChCol
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindowLong
PtrA
(
HWND_32
(
lpChCol
->
hwndOwner
),
GWLP
_HINSTANCE
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
hDlgTmpl16
,
lpChCol
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lpChCol
);
if
(
hResource16
)
FreeResource16
(
hDlgTmpl16
);
...
...
dlls/commdlg/filedlg.c
View file @
bbdac5e4
...
...
@@ -3635,7 +3635,7 @@ static BOOL GetFileName31A(LPOPENFILENAMEA lpofn, /* addess of structure with da
lfs
=
FD31_AllocPrivate
((
LPARAM
)
lpofn
,
dlgType
,
&
callbacks
,
(
DWORD
)
FALSE
);
if
(
lfs
)
{
hInst
=
(
HINSTANCE
)
GetWindowLong
A
(
lpofn
->
hwndOwner
,
GWL
_HINSTANCE
);
hInst
=
(
HINSTANCE
)
GetWindowLong
PtrA
(
lpofn
->
hwndOwner
,
GWLP
_HINSTANCE
);
bRet
=
DialogBoxIndirectParamA
(
hInst
,
lfs
->
template
,
lpofn
->
hwndOwner
,
FD32_FileOpenDlgProc
,
(
LPARAM
)
lfs
);
FD31_DestroyPrivate
(
lfs
);
...
...
@@ -3665,7 +3665,7 @@ static BOOL GetFileName31W(LPOPENFILENAMEW lpofn, /* addess of structure with da
lfs
=
FD31_AllocPrivate
((
LPARAM
)
lpofn
,
dlgType
,
&
callbacks
,
(
DWORD
)
FALSE
);
if
(
lfs
)
{
hInst
=
(
HINSTANCE
)
GetWindowLong
A
(
lpofn
->
hwndOwner
,
GWL
_HINSTANCE
);
hInst
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
lpofn
->
hwndOwner
,
GWLP
_HINSTANCE
);
bRet
=
DialogBoxIndirectParamW
(
hInst
,
lfs
->
template
,
lpofn
->
hwndOwner
,
FD32_FileOpenDlgProc
,
(
LPARAM
)
lfs
);
FD31_DestroyPrivate
(
lfs
);
...
...
dlls/commdlg/filedlg16.c
View file @
bbdac5e4
...
...
@@ -459,7 +459,7 @@ BOOL16 WINAPI GetOpenFileName16(
if
(
lfs
)
{
priv
=
(
PFD16_PRIVATE
)
lfs
->
private1632
;
hInst
=
GetWindow
Word
(
HWND_32
(
lpofn
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindow
LongPtrA
(
HWND_32
(
lpofn
->
hwndOwner
),
GWLP
_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
6
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
priv
->
hDlgTmpl16
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
LPARAM
)
lfs
);
...
...
@@ -501,7 +501,7 @@ BOOL16 WINAPI GetSaveFileName16(
if
(
lfs
)
{
priv
=
(
PFD16_PRIVATE
)
lfs
->
private1632
;
hInst
=
GetWindow
Word
(
HWND_32
(
lpofn
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindow
LongPtrA
(
HWND_32
(
lpofn
->
hwndOwner
),
GWLP
_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
7
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
priv
->
hDlgTmpl16
,
lpofn
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
LPARAM
)
lfs
);
...
...
dlls/commdlg/finddlg.c
View file @
bbdac5e4
...
...
@@ -182,7 +182,7 @@ HWND16 WINAPI FindText16( SEGPTR find )
lfr
->
find
=
TRUE
;
if
(
FINDDLG_Get16BitsTemplate
(
lfr
))
{
hInst
=
GetWindowLong
A
(
HWND_32
(
lfr
->
fr16
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindowLong
PtrA
(
HWND_32
(
lfr
->
fr16
->
hwndOwner
),
GWLP
_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
13
);
ret
=
CreateDialogIndirectParam16
(
hInst
,
lfr
->
template
,
lfr
->
fr16
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
find
);
...
...
@@ -212,7 +212,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
lfr
->
find
=
FALSE
;
if
(
FINDDLG_Get16BitsTemplate
(
lfr
))
{
hInst
=
GetWindowLong
A
(
HWND_32
(
lfr
->
fr16
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindowLong
PtrA
(
HWND_32
(
lfr
->
fr16
->
hwndOwner
),
GWLP
_HINSTANCE
);
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
14
);
ret
=
CreateDialogIndirectParam16
(
hInst
,
lfr
->
template
,
lfr
->
fr16
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
find
);
...
...
dlls/commdlg/fontdlg16.c
View file @
bbdac5e4
...
...
@@ -231,7 +231,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
lpChFont
->
lpTemplateName
=
(
SEGPTR
)
&
cf32a
;
ptr
=
GetProcAddress16
(
GetModuleHandle16
(
"COMMDLG"
),
(
LPCSTR
)
16
);
hInst
=
GetWindowLong
A
(
HWND_32
(
lpChFont
->
hwndOwner
),
GWL
_HINSTANCE
);
hInst
=
GetWindowLong
PtrA
(
HWND_32
(
lpChFont
->
hwndOwner
),
GWLP
_HINSTANCE
);
bRet
=
DialogBoxIndirectParam16
(
hInst
,
hDlgTmpl16
,
lpChFont
->
hwndOwner
,
(
DLGPROC16
)
ptr
,
(
DWORD
)
lpChFont
);
if
(
hResource16
)
FreeResource16
(
hDlgTmpl16
);
...
...
dlls/commdlg/printdlg.c
View file @
bbdac5e4
...
...
@@ -1979,7 +1979,7 @@ BOOL WINAPI PrintDlgA(
{
BOOL
bRet
=
FALSE
;
LPVOID
ptr
;
HINSTANCE
hInst
=
(
HINSTANCE
)
GetWindowLong
A
(
lppd
->
hwndOwner
,
GWL
_HINSTANCE
);
HINSTANCE
hInst
=
(
HINSTANCE
)
GetWindowLong
PtrA
(
lppd
->
hwndOwner
,
GWLP
_HINSTANCE
);
if
(
TRACE_ON
(
commdlg
))
{
char
flagstr
[
1000
]
=
""
;
...
...
@@ -2135,7 +2135,7 @@ BOOL WINAPI PrintDlgW(
{
BOOL
bRet
=
FALSE
;
LPVOID
ptr
;
HINSTANCE
hInst
=
(
HINSTANCE
)
GetWindowLong
W
(
lppd
->
hwndOwner
,
GWL
_HINSTANCE
);
HINSTANCE
hInst
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
lppd
->
hwndOwner
,
GWLP
_HINSTANCE
);
if
(
TRACE_ON
(
commdlg
))
{
char
flagstr
[
1000
]
=
""
;
...
...
dlls/commdlg/printdlg16.c
View file @
bbdac5e4
...
...
@@ -345,7 +345,7 @@ BOOL16 WINAPI PrintDlg16(
)
{
BOOL
bRet
=
FALSE
;
LPVOID
ptr
;
HINSTANCE16
hInst
=
GetWindow
Word
(
HWND_32
(
lppd
->
hwndOwner
),
GWL
_HINSTANCE
);
HINSTANCE16
hInst
=
GetWindow
LongPtrW
(
HWND_32
(
lppd
->
hwndOwner
),
GWLP
_HINSTANCE
);
if
(
TRACE_ON
(
commdlg
))
{
char
flagstr
[
1000
]
=
""
;
...
...
dlls/shell32/autocomplete.c
View file @
bbdac5e4
...
...
@@ -260,7 +260,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
WS_BORDER
|
WS_CHILD
|
WS_VSCROLL
|
LBS_HASSTRINGS
|
LBS_NOTIFY
|
LBS_NOINTEGRALHEIGHT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hwndParent
,
NULL
,
(
HINSTANCE
)
GetWindowLong
A
(
hwndParent
,
GWL
_HINSTANCE
),
NULL
);
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwndParent
,
GWLP
_HINSTANCE
),
NULL
);
if
(
This
->
hwndListBox
)
{
This
->
wpOrigLBoxProc
=
(
WNDPROC
)
SetWindowLongPtrW
(
This
->
hwndListBox
,
GWLP_WNDPROC
,
(
LONG_PTR
)
ACLBoxSubclassProc
);
...
...
dlls/shell32/dialogs.c
View file @
bbdac5e4
...
...
@@ -109,8 +109,8 @@ void WINAPI RunFileDlg(
return
;
}
DialogBoxIndirectParamA
((
HINSTANCE
)
GetWindowLong
A
(
hwndOwner
,
GWL_HINSTANCE
),
DialogBoxIndirectParamA
((
HINSTANCE
)
GetWindowLong
PtrW
(
hwndOwner
,
GWL
P
_HINSTANCE
),
template
,
hwndOwner
,
RunDlgProc
,
(
LPARAM
)
&
rfdp
);
}
...
...
dlls/shell32/shell32_main.c
View file @
bbdac5e4
...
...
@@ -854,7 +854,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
SystemParametersInfoW
(
SPI_GETICONTITLELOGFONT
,
0
,
&
logFont
,
0
);
info
.
hFont
=
CreateFontIndirectW
(
&
logFont
);
bRet
=
DialogBoxIndirectParamW
((
HINSTANCE
)
GetWindowLong
W
(
hWnd
,
GWL
_HINSTANCE
),
bRet
=
DialogBoxIndirectParamW
((
HINSTANCE
)
GetWindowLong
PtrW
(
hWnd
,
GWLP
_HINSTANCE
),
template
,
hWnd
,
AboutDlgProc
,
(
LPARAM
)
&
info
);
DeleteObject
(
info
.
hFont
);
return
bRet
;
...
...
dlls/shell32/shlview.c
View file @
bbdac5e4
...
...
@@ -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
)
{
IShellViewImpl
*
pThis
=
(
IShellViewImpl
*
)
GetWindowLong
A
(
hWnd
,
GWL
_USERDATA
);
IShellViewImpl
*
pThis
=
(
IShellViewImpl
*
)
GetWindowLong
PtrW
(
hWnd
,
GWLP
_USERDATA
);
LPCREATESTRUCTA
lpcs
;
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
case
WM_NCCREATE
:
lpcs
=
(
LPCREATESTRUCTA
)
lParam
;
pThis
=
(
IShellViewImpl
*
)(
lpcs
->
lpCreateParams
);
SetWindowLong
A
(
hWnd
,
GWL_USERDATA
,
(
LONG
)
pThis
);
SetWindowLong
PtrW
(
hWnd
,
GWLP_USERDATA
,
(
ULONG_PTR
)
pThis
);
pThis
->
hWnd
=
hWnd
;
/*set the window handle*/
break
;
...
...
dlls/user/dialog16.c
View file @
bbdac5e4
...
...
@@ -196,7 +196,7 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template,
SendMessageA
(
hwndDefButton
,
BM_SETSTYLE
,
BS_PUSHBUTTON
,
FALSE
);
hwndDefButton
=
hwndCtrl
;
dlgInfo
->
idResult
=
GetWindowLong
A
(
hwndCtrl
,
GWL
_ID
);
dlgInfo
->
idResult
=
GetWindowLong
PtrA
(
hwndCtrl
,
GWLP
_ID
);
}
}
TRACE
(
" END
\n
"
);
...
...
dlls/user/message.c
View file @
bbdac5e4
...
...
@@ -1452,12 +1452,12 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
/* now call the window procedure */
if
(
unicode
)
{
if
(
!
(
winproc
=
(
WNDPROC
)
GetWindowLong
W
(
hwnd
,
GWL
_WNDPROC
)))
goto
done
;
if
(
!
(
winproc
=
(
WNDPROC
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_WNDPROC
)))
goto
done
;
result
=
CallWindowProcW
(
winproc
,
hwnd
,
msg
,
wparam
,
lparam
);
}
else
{
if
(
!
(
winproc
=
(
WNDPROC
)
GetWindowLong
A
(
hwnd
,
GWL
_WNDPROC
)))
goto
done
;
if
(
!
(
winproc
=
(
WNDPROC
)
GetWindowLong
PtrA
(
hwnd
,
GWLP
_WNDPROC
)))
goto
done
;
result
=
CallWindowProcA
(
winproc
,
hwnd
,
msg
,
wparam
,
lparam
);
}
...
...
dlls/user/msg16.c
View file @
bbdac5e4
...
...
@@ -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
,
GWL
P
_WNDPROC
)))
return
0
;
SPY_EnterMessage
(
SPY_SENDMESSAGE16
,
hwnd
,
msg
,
wparam
,
lparam
);
result
=
CallWindowProc16
(
(
WNDPROC16
)
winproc
,
hwnd16
,
msg
,
wparam
,
lparam
);
...
...
dlls/x11drv/desktop.c
View file @
bbdac5e4
...
...
@@ -80,7 +80,7 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
X11DRV_register_window
(
display
,
hwnd
,
win
->
pDriverData
);
WIN_ReleasePtr
(
win
);
SetWindowLong
W
(
hwnd
,
GWL_WNDPROC
,
(
LONG
)
desktop_winproc
);
SetWindowLong
PtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
desktop_winproc
);
wine_tsx11_lock
();
XChangeProperty
(
display
,
root_window
,
x11drv_atom
(
WM_PROTOCOLS
),
XA_ATOM
,
32
,
PropModeReplace
,
(
char
*
)
&
atom
,
1
);
...
...
dlls/x11drv/window.c
View file @
bbdac5e4
...
...
@@ -1282,7 +1282,7 @@ HWND X11DRV_SetParent( HWND hwnd, HWND parent )
{
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
HMENU
menu
=
(
HMENU
)
SetWindowLong
W
(
hwnd
,
GWL
_ID
,
0
);
HMENU
menu
=
(
HMENU
)
SetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
,
0
);
if
(
menu
)
DestroyMenu
(
menu
);
}
}
...
...
dlls/x11drv/x11ddraw.c
View file @
bbdac5e4
...
...
@@ -108,15 +108,13 @@ static void GrabPointer(BOOL grab)
if
(
!
X11DRV_DD_GrabMessage
)
X11DRV_DD_GrabMessage
=
RegisterWindowMessageA
(
"WINE_X11DRV_GRABPOINTER"
);
/* FIXME: Replace with SetWindowLongPtrA when available */
X11DRV_DD_GrabOldProcedure
=
(
WNDPROC
)
SetWindowLongA
(
X11DRV_DD_PrimaryWnd
,
GWL_WNDPROC
,
(
LONG
)
GrabWndProc
);
X11DRV_DD_GrabOldProcedure
=
(
WNDPROC
)
SetWindowLongPtrA
(
X11DRV_DD_PrimaryWnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GrabWndProc
);
SendMessageA
(
X11DRV_DD_PrimaryWnd
,
X11DRV_DD_GrabMessage
,
grab
?
1
:
0
,
0
);
/* FIXME: Replace with SetWindowLongPtrA when available */
if
(
SetWindowLongA
(
X11DRV_DD_PrimaryWnd
,
GWL_WNDPROC
,
(
LONG
)
X11DRV_DD_GrabOldProcedure
)
!=
(
LONG
)
GrabWndProc
)
if
(
SetWindowLongPtrA
(
X11DRV_DD_PrimaryWnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
X11DRV_DD_GrabOldProcedure
)
!=
(
LONG_PTR
)
GrabWndProc
)
ERR
(
"Window procedure has been changed!
\n
"
);
}
...
...
windows/defwnd.c
View file @
bbdac5e4
...
...
@@ -621,7 +621,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
UINT
len
;
HICON
hIcon
=
(
HICON
)
GetClassLongW
(
hwnd
,
GCL_HICON
);
HINSTANCE
instance
=
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
);
HINSTANCE
instance
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
);
if
(
hIcon
)
return
(
LRESULT
)
hIcon
;
for
(
len
=
1
;
len
<
64
;
len
++
)
if
((
hIcon
=
LoadIconW
(
instance
,
MAKEINTRESOURCEW
(
len
))))
...
...
windows/dialog.c
View file @
bbdac5e4
...
...
@@ -360,7 +360,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
if
(
hwndDefButton
)
SendMessageA
(
hwndDefButton
,
BM_SETSTYLE
,
BS_PUSHBUTTON
,
FALSE
);
hwndDefButton
=
hwndCtrl
;
dlgInfo
->
idResult
=
GetWindowLong
A
(
hwndCtrl
,
GWL
_ID
);
dlgInfo
->
idResult
=
GetWindowLong
PtrA
(
hwndCtrl
,
GWLP
_ID
);
}
}
TRACE
(
" END
\n
"
);
...
...
@@ -1219,7 +1219,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
*/
INT
WINAPI
GetDlgCtrlID
(
HWND
hwnd
)
{
return
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
return
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
}
...
...
@@ -1234,7 +1234,7 @@ HWND WINAPI GetDlgItem( HWND hwndDlg, INT id )
if
(
!
list
)
return
0
;
for
(
i
=
0
;
list
[
i
];
i
++
)
if
(
GetWindowLong
W
(
list
[
i
],
GWL
_ID
)
==
id
)
break
;
for
(
i
=
0
;
list
[
i
];
i
++
)
if
(
GetWindowLong
PtrW
(
list
[
i
],
GWLP
_ID
)
==
id
)
break
;
ret
=
list
[
i
];
HeapFree
(
GetProcessHeap
(),
0
,
list
);
return
ret
;
...
...
@@ -1378,7 +1378,7 @@ UINT WINAPI IsDlgButtonChecked( HWND hwnd, UINT id )
*/
static
BOOL
CALLBACK
CheckRB
(
HWND
hwndChild
,
LPARAM
lParam
)
{
LONG
lChildID
=
GetWindowLong
A
(
hwndChild
,
GWL
_ID
);
LONG
lChildID
=
GetWindowLong
PtrW
(
hwndChild
,
GWLP
_ID
);
RADIOGROUP
*
lpRadioGroup
=
(
RADIOGROUP
*
)
lParam
;
if
((
lChildID
>=
lpRadioGroup
->
firstID
)
&&
...
...
@@ -1386,11 +1386,11 @@ static BOOL CALLBACK CheckRB(HWND hwndChild, LPARAM lParam)
{
if
(
lChildID
==
lpRadioGroup
->
checkID
)
{
SendMessage
A
(
hwndChild
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
SendMessage
W
(
hwndChild
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
}
else
{
SendMessage
A
(
hwndChild
,
BM_SETCHECK
,
BST_UNCHECKED
,
0
);
SendMessage
W
(
hwndChild
,
BM_SETCHECK
,
BST_UNCHECKED
,
0
);
}
}
...
...
windows/mdi.c
View file @
bbdac5e4
...
...
@@ -152,7 +152,7 @@ static HWND MDI_GetChildByID(HWND hwnd, UINT id, MDICLIENTINFO *ci)
for
(
i
=
0
;
ci
->
nActiveChildren
;
i
++
)
{
if
(
GetWindowLong
W
(
ci
->
child
[
i
],
GWL
_ID
)
==
id
)
if
(
GetWindowLong
PtrW
(
ci
->
child
[
i
],
GWLP
_ID
)
==
id
)
return
ci
->
child
[
i
];
}
return
0
;
...
...
@@ -430,7 +430,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
visible
++
;
SetWindowLong
W
(
ci
->
child
[
i
],
GWL
_ID
,
id
);
SetWindowLong
PtrW
(
ci
->
child
[
i
],
GWLP
_ID
,
id
);
buf
[
0
]
=
'&'
;
buf
[
1
]
=
'0'
+
visible
;
...
...
windows/message.c
View file @
bbdac5e4
...
...
@@ -288,7 +288,7 @@ static BOOL process_cooked_keyboard_message( MSG *msg, BOOL remove )
HELPINFO
hi
;
hi
.
cbSize
=
sizeof
(
HELPINFO
);
hi
.
iContextType
=
HELPINFO_WINDOW
;
hi
.
iCtrlId
=
GetWindowLong
A
(
msg
->
hwnd
,
GWL
_ID
);
hi
.
iCtrlId
=
GetWindowLong
PtrA
(
msg
->
hwnd
,
GWLP
_ID
);
hi
.
hItemHandle
=
msg
->
hwnd
;
hi
.
dwContextId
=
GetWindowContextHelpId
(
msg
->
hwnd
);
hi
.
MousePos
=
msg
->
pt
;
...
...
@@ -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
*/
...
...
windows/win.c
View file @
bbdac5e4
...
...
@@ -201,7 +201,7 @@ static void send_parent_notify( HWND hwnd, UINT msg )
if
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
(
WS_CHILD
|
WS_POPUP
))
==
WS_CHILD
&&
!
(
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_NOPARENTNOTIFY
))
SendMessageW
(
GetParent
(
hwnd
),
WM_PARENTNOTIFY
,
MAKEWPARAM
(
msg
,
GetWindowLong
W
(
hwnd
,
GWL
_ID
)),
(
LPARAM
)
hwnd
);
MAKEWPARAM
(
msg
,
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
)),
(
LPARAM
)
hwnd
);
}
...
...
@@ -640,7 +640,7 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
HMENU
menu
=
(
HMENU
)
SetWindowLong
W
(
hwnd
,
GWL
_ID
,
0
);
HMENU
menu
=
(
HMENU
)
SetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
,
0
);
if
(
menu
)
DestroyMenu
(
menu
);
}
if
(
wndPtr
->
hSysMenu
)
...
...
@@ -1165,7 +1165,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
}
}
}
else
SetWindowLong
W
(
hwnd
,
GWL_ID
,
(
UINT
)
cs
->
hMenu
);
else
SetWindowLong
PtrW
(
hwnd
,
GWLP_ID
,
(
ULONG_PTR
)
cs
->
hMenu
);
WIN_ReleaseWndPtr
(
wndPtr
);
if
(
!
USER_Driver
.
pCreateWindow
(
hwnd
,
cs
,
unicode
))
...
...
@@ -1797,12 +1797,12 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
switch
(
offset
)
{
case
GWL_HWNDPARENT
:
return
GetWindowLongW
(
hwnd
,
offset
);
case
GWL_ID
:
case
GWL_HINSTANCE
:
case
GWL
P
_HWNDPARENT
:
return
GetWindowLong
Ptr
W
(
hwnd
,
offset
);
case
GWL
P
_ID
:
case
GWL
P
_HINSTANCE
:
{
LONG
ret
=
GetWindowLong
W
(
hwnd
,
offset
);
LONG
_PTR
ret
=
GetWindowLongPtr
W
(
hwnd
,
offset
);
if
(
HIWORD
(
ret
))
WARN
(
"%d: discards high bits of 0x%08lx!
\n
"
,
offset
,
ret
);
return
LOWORD
(
ret
);
...
...
@@ -1824,10 +1824,10 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
switch
(
offset
)
{
case
GWL_ID
:
case
GWL_HINSTANCE
:
case
GWL_HWNDPARENT
:
return
SetWindowLong
W
(
hwnd
,
offset
,
(
UINT
)
newval
);
case
GWL
P
_ID
:
case
GWL
P
_HINSTANCE
:
case
GWL
P
_HWNDPARENT
:
return
SetWindowLong
PtrW
(
hwnd
,
offset
,
(
ULONG_PTR
)
newval
);
default:
if
(
offset
<
0
)
{
...
...
@@ -1884,16 +1884,16 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
*
* Helper function for GetWindowLong().
*/
static
LONG
WIN_GetWindowLong
(
HWND
hwnd
,
INT
offset
,
WINDOWPROCTYPE
type
)
static
LONG
_PTR
WIN_GetWindowLong
(
HWND
hwnd
,
INT
offset
,
WINDOWPROCTYPE
type
)
{
LONG
retvalue
=
0
;
LONG
_PTR
retvalue
=
0
;
WND
*
wndPtr
;
if
(
offset
==
GWL_HWNDPARENT
)
if
(
offset
==
GWL
P
_HWNDPARENT
)
{
HWND
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
if
(
parent
==
GetDesktopWindow
())
parent
=
GetWindow
(
hwnd
,
GW_OWNER
);
return
(
LONG
)
parent
;
return
(
ULONG_PTR
)
parent
;
}
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
)))
...
...
@@ -1904,7 +1904,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
if
(
wndPtr
==
WND_OTHER_PROCESS
)
{
if
(
offset
==
GWL_WNDPROC
)
if
(
offset
==
GWL
P
_WNDPROC
)
{
SetLastError
(
ERROR_ACCESS_DENIED
);
return
0
;
...
...
@@ -1919,11 +1919,11 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
{
switch
(
offset
)
{
case
GWL_STYLE
:
retvalue
=
reply
->
old_style
;
break
;
case
GWL_EXSTYLE
:
retvalue
=
reply
->
old_ex_style
;
break
;
case
GWL_ID
:
retvalue
=
reply
->
old_id
;
break
;
case
GWL_HINSTANCE
:
retvalue
=
(
ULONG_PTR
)
reply
->
old_instance
;
break
;
case
GWL_USERDATA
:
retvalue
=
(
ULONG_PTR
)
reply
->
old_user_data
;
break
;
case
GWL_STYLE
:
retvalue
=
reply
->
old_style
;
break
;
case
GWL_EXSTYLE
:
retvalue
=
reply
->
old_ex_style
;
break
;
case
GWL
P
_ID
:
retvalue
=
reply
->
old_id
;
break
;
case
GWL
P
_HINSTANCE
:
retvalue
=
(
ULONG_PTR
)
reply
->
old_instance
;
break
;
case
GWL
P
_USERDATA
:
retvalue
=
(
ULONG_PTR
)
reply
->
old_user_data
;
break
;
default:
if
(
offset
>=
0
)
retvalue
=
reply
->
old_extra_value
;
else
SetLastError
(
ERROR_INVALID_INDEX
);
...
...
@@ -1974,12 +1974,12 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
switch
(
offset
)
{
case
GWL
_USERDATA
:
retvalue
=
wndPtr
->
userdata
;
break
;
case
GWL
P_USERDATA
:
retvalue
=
wndPtr
->
userdata
;
break
;
case
GWL_STYLE
:
retvalue
=
wndPtr
->
dwStyle
;
break
;
case
GWL_EXSTYLE
:
retvalue
=
wndPtr
->
dwExStyle
;
break
;
case
GWL
_ID
:
retvalue
=
(
LONG
)
wndPtr
->
wIDmenu
;
break
;
case
GWL
_WNDPROC
:
retvalue
=
(
LONG
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
break
;
case
GWL
_HINSTANCE
:
retvalue
=
(
LONG
)
wndPtr
->
hInstance
;
break
;
case
GWL
P_ID
:
retvalue
=
(
ULONG_PTR
)
wndPtr
->
wIDmenu
;
break
;
case
GWL
P_WNDPROC
:
retvalue
=
(
ULONG_PTR
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
break
;
case
GWL
P_HINSTANCE
:
retvalue
=
(
ULONG_PTR
)
wndPtr
->
hInstance
;
break
;
default:
WARN
(
"Unknown offset %d
\n
"
,
offset
);
SetLastError
(
ERROR_INVALID_INDEX
);
...
...
@@ -1998,8 +1998,8 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
* 0 is the failure code. However, in the case of failure SetLastError
* must be set to distinguish between a 0 return value and a failure.
*/
static
LONG
WIN_SetWindowLong
(
HWND
hwnd
,
INT
offset
,
LONG
newval
,
WINDOWPROCTYPE
type
)
static
LONG
_PTR
WIN_SetWindowLong
(
HWND
hwnd
,
INT
offset
,
LONG_PTR
newval
,
WINDOWPROCTYPE
type
)
{
STYLESTRUCT
style
;
BOOL
ok
;
...
...
@@ -2015,7 +2015,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
}
if
(
!
WIN_IsCurrentProcess
(
hwnd
))
{
if
(
offset
==
GWL_WNDPROC
)
if
(
offset
==
GWL
P
_WNDPROC
)
{
SetLastError
(
ERROR_ACCESS_DENIED
);
return
0
;
...
...
@@ -2045,31 +2045,31 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
))
||
wndPtr
==
WND_OTHER_PROCESS
)
return
0
;
newval
=
style
.
styleNew
;
break
;
case
GWL_HWNDPARENT
:
case
GWL
P
_HWNDPARENT
:
if
(
wndPtr
->
parent
==
GetDesktopWindow
())
{
WIN_ReleasePtr
(
wndPtr
);
return
(
LONG
)
WIN_SetOwner
(
hwnd
,
(
HWND
)
newval
);
return
(
ULONG_PTR
)
WIN_SetOwner
(
hwnd
,
(
HWND
)
newval
);
}
else
{
WIN_ReleasePtr
(
wndPtr
);
return
(
LONG
)
SetParent
(
hwnd
,
(
HWND
)
newval
);
return
(
ULONG_PTR
)
SetParent
(
hwnd
,
(
HWND
)
newval
);
}
case
GWL_WNDPROC
:
retval
=
(
LONG
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
case
GWL
P
_WNDPROC
:
retval
=
(
ULONG_PTR
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
WINPROC_SetProc
(
&
wndPtr
->
winproc
,
(
WNDPROC
)
newval
,
type
,
WIN_PROC_WINDOW
);
WIN_ReleasePtr
(
wndPtr
);
return
retval
;
case
GWL_ID
:
case
GWL_HINSTANCE
:
case
GWL_USERDATA
:
case
GWL
P
_ID
:
case
GWL
P
_HINSTANCE
:
case
GWL
P
_USERDATA
:
break
;
case
DWL_DLGPROC
:
if
((
wndPtr
->
cbWndExtra
+
sizeof
(
LONG
)
>=
DWL_DLGPROC
)
&&
(
wndPtr
->
flags
&
WIN_ISDIALOG
))
case
DWL
P
_DLGPROC
:
if
((
wndPtr
->
cbWndExtra
+
sizeof
(
LONG
)
>=
DWL
P
_DLGPROC
)
&&
(
wndPtr
->
flags
&
WIN_ISDIALOG
))
{
WNDPROC
*
ptr
=
(
WNDPROC
*
)((
char
*
)
wndPtr
->
wExtra
+
DWL_DLGPROC
);
retval
=
(
LONG
)
WINPROC_GetProc
(
*
ptr
,
type
);
WNDPROC
*
ptr
=
(
WNDPROC
*
)((
char
*
)
wndPtr
->
wExtra
+
DWL
P
_DLGPROC
);
retval
=
(
ULONG_PTR
)
WINPROC_GetProc
(
*
ptr
,
type
);
WINPROC_SetProc
(
ptr
,
(
WNDPROC
)
newval
,
type
,
WIN_PROC_WINDOW
);
WIN_ReleasePtr
(
wndPtr
);
return
retval
;
...
...
@@ -2085,7 +2085,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
}
else
{
LONG
*
ptr
=
(
LONG
*
)((
char
*
)
wndPtr
->
wExtra
+
offset
);
LONG
_PTR
*
ptr
=
(
LONG_PTR
*
)((
char
*
)
wndPtr
->
wExtra
+
offset
);
if
(
*
ptr
==
newval
)
/* already set to the same value */
{
WIN_ReleasePtr
(
wndPtr
);
...
...
@@ -2109,15 +2109,15 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
req
->
flags
=
SET_WIN_EXSTYLE
;
req
->
ex_style
=
newval
;
break
;
case
GWL_ID
:
case
GWL
P
_ID
:
req
->
flags
=
SET_WIN_ID
;
req
->
id
=
newval
;
break
;
case
GWL_HINSTANCE
:
case
GWL
P
_HINSTANCE
:
req
->
flags
=
SET_WIN_INSTANCE
;
req
->
instance
=
(
void
*
)
newval
;
break
;
case
GWL_USERDATA
:
case
GWL
P
_USERDATA
:
req
->
flags
=
SET_WIN_USERDATA
;
req
->
user_data
=
(
void
*
)
newval
;
break
;
...
...
@@ -2139,15 +2139,15 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
wndPtr
->
dwExStyle
=
newval
;
retval
=
reply
->
old_ex_style
;
break
;
case
GWL_ID
:
case
GWL
P
_ID
:
wndPtr
->
wIDmenu
=
newval
;
retval
=
reply
->
old_id
;
break
;
case
GWL_HINSTANCE
:
case
GWL
P
_HINSTANCE
:
wndPtr
->
hInstance
=
(
HINSTANCE
)
newval
;
retval
=
(
ULONG_PTR
)
reply
->
old_instance
;
break
;
case
GWL_USERDATA
:
case
GWL
P
_USERDATA
:
wndPtr
->
userdata
=
newval
;
retval
=
(
ULONG_PTR
)
reply
->
old_user_data
;
break
;
...
...
@@ -2238,23 +2238,23 @@ LONG WINAPI SetWindowLongA( HWND hwnd, INT offset, LONG newval )
*
* GWL_STYLE The window's window style.
*
* GWL
_WNDPROC
Pointer to the window's window procedure.
* GWL
P_WNDPROC
Pointer to the window's window procedure.
*
* GWL
_HINSTANCE
The window's pplication instance handle.
* GWL
P_HINSTANCE
The window's pplication instance handle.
*
* GWL
_ID
The window's identifier.
* GWL
P_ID
The window's identifier.
*
* GWL
_USERDATA
The window's user-specified data.
* GWL
P_USERDATA
The window's user-specified data.
*
* If the window is a dialog box, the _offset_ parameter can be one of
* the following values:
*
* DWL
_DLGPROC
The address of the window's dialog box procedure.
* DWL
P_DLGPROC
The address of the window's dialog box procedure.
*
* DWL
_MSGRESULT
The return value of a message
* DWL
P_MSGRESULT
The return value of a message
* that the dialog box procedure processed.
*
* DWL
_USER
Application specific information.
* DWL
P_USER
Application specific information.
*
* RETURNS
*
...
...
@@ -2625,7 +2625,7 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent )
{
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
HMENU
menu
=
(
HMENU
)
SetWindowLong
W
(
hwnd
,
GWL
_ID
,
0
);
HMENU
menu
=
(
HMENU
)
SetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
,
0
);
if
(
menu
)
DestroyMenu
(
menu
);
}
}
...
...
windows/winproc.c
View file @
bbdac5e4
...
...
@@ -361,7 +361,7 @@ static LRESULT WINAPI WINPROC_CallWndProc16( WNDPROC16 proc, HWND16 hwnd,
context
.
SegDs
=
context
.
SegEs
=
SELECTOROF
(
teb
->
cur_stack
);
context
.
SegFs
=
wine_get_fs
();
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
),
GWL
P
_HINSTANCE
)))
context
.
Eax
=
context
.
SegDs
;
context
.
SegCs
=
SELECTOROF
(
proc
);
context
.
Eip
=
OFFSETOF
(
proc
);
context
.
Ebp
=
OFFSETOF
(
teb
->
cur_stack
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment