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
5c377858
Commit
5c377858
authored
Sep 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Get/SetWindowLongPtr when accessing pointers in the window extra
bytes.
parent
5b7da809
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
button.c
dlls/user/button.c
+1
-1
combo.c
dlls/user/combo.c
+3
-3
edit.c
dlls/user/edit.c
+3
-3
listbox.c
dlls/user/listbox.c
+4
-4
menu.c
dlls/user/menu.c
+6
-6
No files found.
dlls/user/button.c
View file @
5c377858
...
...
@@ -469,7 +469,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
default:
return
0
;
}
oldHbitmap
=
(
HBITMAP
)
SetWindowLongW
(
hWnd
,
HIMAGE_GWL_OFFSET
,
lParam
);
oldHbitmap
=
(
HBITMAP
)
SetWindowLong
Ptr
W
(
hWnd
,
HIMAGE_GWL_OFFSET
,
lParam
);
InvalidateRect
(
hWnd
,
NULL
,
FALSE
);
return
(
LRESULT
)
oldHbitmap
;
...
...
dlls/user/combo.c
View file @
5c377858
...
...
@@ -152,7 +152,7 @@ static LRESULT COMBO_NCCreate(HWND hwnd, LONG style)
if
(
COMBO_Init
()
&&
(
lphc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
HEADCOMBO
)))
)
{
lphc
->
self
=
hwnd
;
SetWindowLong
W
(
hwnd
,
0
,
(
LONG
)
lphc
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
LONG_PTR
)
lphc
);
/* some braindead apps do try to use scrollbar/border flags */
...
...
@@ -190,7 +190,7 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
if
(
(
CB_GETTYPE
(
lphc
)
!=
CBS_SIMPLE
)
&&
lphc
->
hWndLBox
)
DestroyWindow
(
lphc
->
hWndLBox
);
SetWindowLongW
(
lphc
->
self
,
0
,
0
);
SetWindowLong
Ptr
W
(
lphc
->
self
,
0
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
lphc
);
}
return
0
;
...
...
@@ -1865,7 +1865,7 @@ static char *strdupA(LPCSTR str)
static
LRESULT
ComboWndProc_common
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
LPHEADCOMBO
lphc
=
(
LPHEADCOMBO
)
GetWindowLongW
(
hwnd
,
0
);
LPHEADCOMBO
lphc
=
(
LPHEADCOMBO
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
TRACE
(
"[%p]: msg %s wp %08x lp %08lx
\n
"
,
hwnd
,
SPY_GetMsgName
(
message
,
hwnd
),
wParam
,
lParam
);
...
...
dlls/user/edit.c
View file @
5c377858
...
...
@@ -424,7 +424,7 @@ static inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
static
LRESULT
WINAPI
EditWndProc_common
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
EDITSTATE
*
es
=
(
EDITSTATE
*
)
GetWindowLongW
(
hwnd
,
0
);
EDITSTATE
*
es
=
(
EDITSTATE
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
LRESULT
result
=
0
;
TRACE
(
"hwnd=%p msg=%x (%s) wparam=%x lparam=%lx
\n
"
,
hwnd
,
msg
,
SPY_GetMsgName
(
msg
,
hwnd
),
wParam
,
lParam
);
...
...
@@ -4116,7 +4116,7 @@ static LRESULT EDIT_WM_Destroy(EDITSTATE *es)
pc
=
pp
;
}
SetWindowLongW
(
es
->
hwndSelf
,
0
,
0
);
SetWindowLong
Ptr
W
(
es
->
hwndSelf
,
0
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
es
);
return
0
;
...
...
@@ -4615,7 +4615,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
if
(
!
(
es
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
es
))))
return
FALSE
;
SetWindowLong
W
(
hwnd
,
0
,
(
LONG
)
es
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
LONG_PTR
)
es
);
/*
* Note: since the EDITSTATE has not been fully initialized yet,
...
...
dlls/user/listbox.c
View file @
5c377858
...
...
@@ -2489,7 +2489,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
descr
->
owner
=
lphc
->
self
;
}
SetWindowLong
W
(
descr
->
self
,
0
,
(
LONG
)
descr
);
SetWindowLong
PtrW
(
descr
->
self
,
0
,
(
LONG_PTR
)
descr
);
/* if (wnd->dwExStyle & WS_EX_NOPARENTNOTIFY) descr->style &= ~LBS_NOTIFY;
*/
...
...
@@ -2530,7 +2530,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
static
BOOL
LISTBOX_Destroy
(
LB_DESCR
*
descr
)
{
LISTBOX_ResetContent
(
descr
);
SetWindowLongW
(
descr
->
self
,
0
,
0
);
SetWindowLong
Ptr
W
(
descr
->
self
,
0
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
descr
);
return
TRUE
;
}
...
...
@@ -2542,7 +2542,7 @@ static BOOL LISTBOX_Destroy( LB_DESCR *descr )
static
LRESULT
WINAPI
ListBoxWndProc_common
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
LB_DESCR
*
descr
=
(
LB_DESCR
*
)
GetWindowLongW
(
hwnd
,
0
);
LB_DESCR
*
descr
=
(
LB_DESCR
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
LPHEADCOMBO
lphc
=
0
;
LRESULT
ret
;
...
...
@@ -2555,7 +2555,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
CREATESTRUCTW
*
lpcs
=
(
CREATESTRUCTW
*
)
lParam
;
if
(
lpcs
->
style
&
LBS_COMBOBOX
)
lphc
=
(
LPHEADCOMBO
)
lpcs
->
lpCreateParams
;
if
(
!
LISTBOX_Create
(
hwnd
,
lphc
))
return
-
1
;
TRACE
(
"creating wnd=%p descr=%lx
\n
"
,
hwnd
,
GetWindowLongW
(
hwnd
,
0
)
);
TRACE
(
"creating wnd=%p descr=%lx
\n
"
,
hwnd
,
GetWindowLong
Ptr
W
(
hwnd
,
0
)
);
return
0
;
}
/* Ignore all other messages before we get a WM_CREATE */
...
...
dlls/user/menu.c
View file @
5c377858
...
...
@@ -3129,7 +3129,7 @@ static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam,
case
WM_CREATE
:
{
CREATESTRUCTW
*
cs
=
(
CREATESTRUCTW
*
)
lParam
;
SetWindowLong
W
(
hwnd
,
0
,
(
LONG
)
cs
->
lpCreateParams
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
LONG_PTR
)
cs
->
lpCreateParams
);
return
0
;
}
...
...
@@ -3141,7 +3141,7 @@ static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam,
PAINTSTRUCT
ps
;
BeginPaint
(
hwnd
,
&
ps
);
MENU_DrawPopupMenu
(
hwnd
,
ps
.
hdc
,
(
HMENU
)
GetWindowLongW
(
hwnd
,
0
)
);
(
HMENU
)
GetWindowLong
Ptr
W
(
hwnd
,
0
)
);
EndPaint
(
hwnd
,
&
ps
);
return
0
;
}
...
...
@@ -3157,18 +3157,18 @@ static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam,
if
(
wParam
)
{
if
(
!
GetWindowLongW
(
hwnd
,
0
))
ERR
(
"no menu to display
\n
"
);
if
(
!
GetWindowLong
Ptr
W
(
hwnd
,
0
))
ERR
(
"no menu to display
\n
"
);
}
else
SetWindowLongW
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
0
);
break
;
case
MM_SETMENUHANDLE
:
SetWindowLongW
(
hwnd
,
0
,
wParam
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
wParam
);
break
;
case
MM_GETMENUHANDLE
:
return
GetWindowLongW
(
hwnd
,
0
);
return
GetWindowLong
Ptr
W
(
hwnd
,
0
);
default:
return
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
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