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
cdb263e5
Commit
cdb263e5
authored
Aug 25, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Aug 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GetWindowLong by GetWindowLongPtr.
parent
bc6ce2b2
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
157 additions
and
157 deletions
+157
-157
animate.c
dlls/comctl32/animate.c
+5
-5
comboex.c
dlls/comctl32/comboex.c
+11
-11
commctrl.c
dlls/comctl32/commctrl.c
+12
-12
datetime.c
dlls/comctl32/datetime.c
+6
-6
flatsb.c
dlls/comctl32/flatsb.c
+1
-1
header.c
dlls/comctl32/header.c
+7
-7
hotkey.c
dlls/comctl32/hotkey.c
+3
-3
ipaddress.c
dlls/comctl32/ipaddress.c
+9
-9
listview.c
dlls/comctl32/listview.c
+11
-11
monthcal.c
dlls/comctl32/monthcal.c
+9
-9
nativefont.c
dlls/comctl32/nativefont.c
+3
-3
pager.c
dlls/comctl32/pager.c
+7
-7
progress.c
dlls/comctl32/progress.c
+3
-3
propsheet.c
dlls/comctl32/propsheet.c
+19
-19
rebar.c
dlls/comctl32/rebar.c
+3
-3
status.c
dlls/comctl32/status.c
+8
-8
syslink.c
dlls/comctl32/syslink.c
+4
-4
tab.c
dlls/comctl32/tab.c
+5
-5
tooltips.c
dlls/comctl32/tooltips.c
+3
-3
trackbar.c
dlls/comctl32/trackbar.c
+5
-5
treeview.c
dlls/comctl32/treeview.c
+17
-17
updown.c
dlls/comctl32/updown.c
+6
-6
No files found.
dlls/comctl32/animate.c
View file @
cdb263e5
...
...
@@ -85,7 +85,7 @@ typedef struct
HBITMAP
hbmPrevFrame
;
}
ANIMATE_INFO
;
#define ANIMATE_GetInfoPtr(hWnd) ((ANIMATE_INFO *)GetWindowLong
A
(hWnd, 0))
#define ANIMATE_GetInfoPtr(hWnd) ((ANIMATE_INFO *)GetWindowLong
PtrW
(hWnd, 0))
#define ANIMATE_COLOR_NONE 0xffffffff
static
void
ANIMATE_Notify
(
ANIMATE_INFO
*
infoPtr
,
UINT
notif
)
...
...
@@ -704,7 +704,7 @@ static LRESULT ANIMATE_OpenA(HWND hWnd, WPARAM wParam, LPARAM lParam)
}
if
(
!
hInstance
)
hInstance
=
(
HINSTANCE
)
GetWindowLong
A
(
hWnd
,
GWL
_HINSTANCE
);
hInstance
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
hWnd
,
GWLP
_HINSTANCE
);
if
(
HIWORD
(
lParam
))
{
TRACE
(
"(
\"
%s
\"
);
\n
"
,
(
LPSTR
)
lParam
);
...
...
@@ -794,13 +794,13 @@ static LRESULT ANIMATE_Create(HWND hWnd, WPARAM wParam, LPARAM lParam)
}
/* store crossref hWnd <-> info structure */
SetWindowLong
A
(
hWnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hWnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
infoPtr
->
hwndSelf
=
hWnd
;
infoPtr
->
hwndNotify
=
((
LPCREATESTRUCTA
)
lParam
)
->
hwndParent
;
infoPtr
->
transparentColor
=
ANIMATE_COLOR_NONE
;
infoPtr
->
hbmPrevFrame
=
0
;
TRACE
(
"Animate style=0x%08lx, parent=%
08lx
\n
"
,
GetWindowLongA
(
hWnd
,
GWL_STYLE
),
(
DWORD
)
infoPtr
->
hwndNotify
);
TRACE
(
"Animate style=0x%08lx, parent=%
p
\n
"
,
GetWindowLongA
(
hWnd
,
GWL_STYLE
),
infoPtr
->
hwndNotify
);
InitializeCriticalSection
(
&
infoPtr
->
cs
);
...
...
@@ -818,7 +818,7 @@ static LRESULT ANIMATE_Destroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
/* free animate info data */
Free
(
infoPtr
);
SetWindowLong
A
(
hWnd
,
0
,
0
);
SetWindowLong
PtrW
(
hWnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/comboex.c
View file @
cdb263e5
...
...
@@ -122,7 +122,7 @@ typedef struct
#define CBE_SEP 4
#define COMBOEX_SUBCLASS_PROP "CCComboEx32SubclassInfo"
#define COMBOEX_GetInfoPtr(hwnd) ((COMBOEX_INFO *)GetWindowLongW (hwnd, 0))
#define COMBOEX_GetInfoPtr(hwnd) ((COMBOEX_INFO *)GetWindowLong
Ptr
W (hwnd, 0))
/* Things common to the entire DLL */
...
...
@@ -943,7 +943,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
}
infoPtr
->
NtfUnicode
=
(
i
==
NFR_UNICODE
);
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* create combo box */
GetWindowRect
(
hwnd
,
&
wnrc1
);
...
...
@@ -967,8 +967,8 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
WS_CHILD
|
WS_VISIBLE
|
CBS_OWNERDRAWFIXED
|
GetWindowLongW
(
hwnd
,
GWL_STYLE
),
cs
->
y
,
cs
->
x
,
cs
->
cx
,
cs
->
cy
,
hwnd
,
(
HMENU
)
GetWindowLong
W
(
hwnd
,
GWL
_ID
),
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
),
NULL
);
(
HMENU
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
),
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
),
NULL
);
/*
* native does the following at this point according to trace:
...
...
@@ -983,8 +983,8 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
* data structure.
*/
SetPropA
(
infoPtr
->
hwndCombo
,
COMBOEX_SUBCLASS_PROP
,
hwnd
);
infoPtr
->
prevComboWndProc
=
(
WNDPROC
)
SetWindowLongW
(
infoPtr
->
hwndCombo
,
GWL
_WNDPROC
,
(
LONG
)
COMBOEX_ComboWndProc
);
infoPtr
->
prevComboWndProc
=
(
WNDPROC
)
SetWindowLong
Ptr
W
(
infoPtr
->
hwndCombo
,
GWL
P_WNDPROC
,
(
DWORD_PTR
)
COMBOEX_ComboWndProc
);
infoPtr
->
font
=
(
HFONT
)
SendMessageW
(
infoPtr
->
hwndCombo
,
WM_GETFONT
,
0
,
0
);
...
...
@@ -997,8 +997,8 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
ES_AUTOHSCROLL
,
0
,
0
,
0
,
0
,
/* will set later */
infoPtr
->
hwndCombo
,
(
HMENU
)
GetWindowLong
W
(
hwnd
,
GWL
_ID
),
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
),
NULL
);
(
HMENU
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
),
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
),
NULL
);
/* native does the following at this point according to trace:
* GetWindowThreadProcessId(hwndEdit,0)
...
...
@@ -1012,8 +1012,8 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
* data structure.
*/
SetPropA
(
infoPtr
->
hwndEdit
,
COMBOEX_SUBCLASS_PROP
,
hwnd
);
infoPtr
->
prevEditWndProc
=
(
WNDPROC
)
SetWindowLongW
(
infoPtr
->
hwndEdit
,
GWL
_WNDPROC
,
(
LONG
)
COMBOEX_EditWndProc
);
infoPtr
->
prevEditWndProc
=
(
WNDPROC
)
SetWindowLong
Ptr
W
(
infoPtr
->
hwndEdit
,
GWL
P_WNDPROC
,
(
DWORD_PTR
)
COMBOEX_EditWndProc
);
infoPtr
->
font
=
(
HFONT
)
SendMessageW
(
infoPtr
->
hwndCombo
,
WM_GETFONT
,
0
,
0
);
}
...
...
@@ -1546,7 +1546,7 @@ static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
/* free comboex info data */
Free
(
infoPtr
);
SetWindowLongW
(
infoPtr
->
hwndSelf
,
0
,
0
);
SetWindowLong
Ptr
W
(
infoPtr
->
hwndSelf
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/commctrl.c
View file @
cdb263e5
...
...
@@ -1116,11 +1116,11 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
/* set window procedure to our own and save the current one */
if
(
IsWindowUnicode
(
hWnd
))
stack
->
origproc
=
(
WNDPROC
)
SetWindowLong
W
(
hWnd
,
GWL
_WNDPROC
,
(
LONG
)
COMCTL32_SubclassProc
);
stack
->
origproc
=
(
WNDPROC
)
SetWindowLong
PtrW
(
hWnd
,
GWLP
_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
else
stack
->
origproc
=
(
WNDPROC
)
SetWindowLong
A
(
hWnd
,
GWL
_WNDPROC
,
(
LONG
)
COMCTL32_SubclassProc
);
stack
->
origproc
=
(
WNDPROC
)
SetWindowLong
PtrA
(
hWnd
,
GWLP
_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
}
else
{
/* Check to see if we have called this function with the same uIDSubClass
...
...
@@ -1140,9 +1140,9 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
if
(
!
proc
)
{
ERR
(
"Failed to allocate subclass entry in stack
\n
"
);
if
(
IsWindowUnicode
(
hWnd
))
SetWindowLong
W
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLong
A
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
HeapFree
(
GetProcessHeap
(),
0
,
stack
);
RemovePropA
(
hWnd
,
COMCTL32_aSubclass
);
return
FALSE
;
...
...
@@ -1255,9 +1255,9 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
TRACE
(
"Last Subclass removed, cleaning up
\n
"
);
/* clean up our heap and reset the origional window procedure */
if
(
IsWindowUnicode
(
hWnd
))
SetWindowLong
W
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLong
A
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
HeapFree
(
GetProcessHeap
(),
0
,
stack
);
RemovePropA
(
hWnd
,
COMCTL32_aSubclass
);
}
...
...
@@ -1297,9 +1297,9 @@ LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
TRACE
(
"Last Subclass removed, cleaning up
\n
"
);
/* clean up our heap and reset the origional window procedure */
if
(
IsWindowUnicode
(
hWnd
))
SetWindowLong
W
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLong
A
(
hWnd
,
GWL_WNDPROC
,
(
LONG
)
stack
->
origproc
);
SetWindowLong
PtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
HeapFree
(
GetProcessHeap
(),
0
,
stack
);
RemovePropA
(
hWnd
,
COMCTL32_aSubclass
);
}
...
...
@@ -1387,12 +1387,12 @@ COMCTL32_CreateToolTip(HWND hwndOwner)
/* true owner can be different if hwndOwner is a child window */
HWND
hwndTrueOwner
=
GetWindow
(
hwndToolTip
,
GW_OWNER
);
nmttc
.
hdr
.
hwndFrom
=
hwndTrueOwner
;
nmttc
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwndTrueOwner
,
GWL
_ID
);
nmttc
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwndTrueOwner
,
GWLP
_ID
);
nmttc
.
hdr
.
code
=
NM_TOOLTIPSCREATED
;
nmttc
.
hwndToolTips
=
hwndToolTip
;
SendMessageA
(
GetParent
(
hwndTrueOwner
),
WM_NOTIFY
,
(
WPARAM
)
GetWindowLong
A
(
hwndTrueOwner
,
GWL
_ID
),
(
WPARAM
)
GetWindowLong
PtrW
(
hwndTrueOwner
,
GWLP
_ID
),
(
LPARAM
)
&
nmttc
);
}
...
...
dlls/comctl32/datetime.c
View file @
cdb263e5
...
...
@@ -110,7 +110,7 @@ extern int MONTHCAL_MonthLength(int month, int year);
#define DTHT_MCPOPUP 0x300
/* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
#define DTHT_GOTFOCUS 0x400
/* tests for date-fields */
#define DATETIME_GetInfoPtr(hwnd) ((DATETIME_INFO *)GetWindowLong
A
(hwnd, 0))
#define DATETIME_GetInfoPtr(hwnd) ((DATETIME_INFO *)GetWindowLong
PtrW
(hwnd, 0))
static
BOOL
DATETIME_SendSimpleNotify
(
HWND
hwnd
,
UINT
code
);
static
BOOL
DATETIME_SendDateTimeChangeNotify
(
HWND
hwnd
);
...
...
@@ -1128,7 +1128,7 @@ DATETIME_SendDateTimeChangeNotify (HWND hwnd)
TRACE
(
"
\n
"
);
dtdtc
.
nmhdr
.
hwndFrom
=
hwnd
;
dtdtc
.
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
dtdtc
.
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
dtdtc
.
nmhdr
.
code
=
DTN_DATETIMECHANGE
;
if
((
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
DTS_SHOWNONE
))
...
...
@@ -1150,7 +1150,7 @@ DATETIME_SendSimpleNotify (HWND hwnd, UINT code)
TRACE
(
"%x
\n
"
,
code
);
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
code
;
return
(
BOOL
)
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
...
...
@@ -1221,14 +1221,14 @@ DATETIME_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
return
0
;
}
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrA
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
if
(
dwStyle
&
DTS_SHOWNONE
)
{
infoPtr
->
hwndCheckbut
=
CreateWindowExA
(
0
,
"button"
,
0
,
WS_CHILD
|
WS_VISIBLE
|
BS_AUTOCHECKBOX
,
2
,
2
,
13
,
13
,
hwnd
,
0
,
(
HINSTANCE
)
GetWindowLong
A
(
hwnd
,
GWL
_HINSTANCE
),
0
);
0
,
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
),
0
);
SendMessageA
(
infoPtr
->
hwndCheckbut
,
BM_SETCHECK
,
1
,
0
);
}
...
...
@@ -1276,7 +1276,7 @@ DATETIME_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr
->
hMonthCal
=
NULL
;
}
Free
(
infoPtr
);
SetWindowLongA
(
hwnd
,
0
,
0
);
/* clear infoPtr */
SetWindowLong
Ptr
A
(
hwnd
,
0
,
0
);
/* clear infoPtr */
return
0
;
}
...
...
dlls/comctl32/flatsb.c
View file @
cdb263e5
...
...
@@ -47,7 +47,7 @@ typedef struct
DWORD
dwDummy
;
/* just to keep the compiler happy ;-) */
}
FLATSB_INFO
,
*
LPFLATSB_INFO
;
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLong
A
(hwnd, 0))
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLong
PtrW
(hwnd, 0))
/***********************************************************************
...
...
dlls/comctl32/header.c
View file @
cdb263e5
...
...
@@ -92,7 +92,7 @@ typedef struct
#define VERT_BORDER 3
#define DIVIDER_WIDTH 10
#define HEADER_GetInfoPtr(hwnd) ((HEADER_INFO *)GetWindowLong
A
(hwnd,0))
#define HEADER_GetInfoPtr(hwnd) ((HEADER_INFO *)GetWindowLong
PtrW
(hwnd,0))
inline
static
LRESULT
...
...
@@ -190,7 +190,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
if
(
phdi
->
fmt
&
HDF_OWNERDRAW
)
{
DRAWITEMSTRUCT
dis
;
dis
.
CtlType
=
ODT_HEADER
;
dis
.
CtlID
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
dis
.
CtlID
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
dis
.
itemID
=
iItem
;
dis
.
itemAction
=
ODA_DRAWENTIRE
;
dis
.
itemState
=
phdi
->
bDown
?
ODS_SELECTED
:
0
;
...
...
@@ -542,7 +542,7 @@ HEADER_SendSimpleNotify (HWND hwnd, UINT code)
NMHDR
nmhdr
;
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
code
;
return
(
BOOL
)
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
...
...
@@ -557,7 +557,7 @@ HEADER_SendHeaderNotify (HWND hwnd, UINT code, INT iItem, INT mask)
HDITEMA
nmitem
;
nmhdr
.
hdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
hdr
.
code
=
code
;
nmhdr
.
iItem
=
iItem
;
nmhdr
.
iButton
=
0
;
...
...
@@ -586,7 +586,7 @@ HEADER_SendClickNotify (HWND hwnd, UINT code, INT iItem)
NMHEADERA
nmhdr
;
nmhdr
.
hdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
hdr
.
code
=
code
;
nmhdr
.
iItem
=
iItem
;
nmhdr
.
iButton
=
0
;
...
...
@@ -1284,7 +1284,7 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
HDC
hdc
;
infoPtr
=
(
HEADER_INFO
*
)
Alloc
(
sizeof
(
HEADER_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrA
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
infoPtr
->
hwndNotify
=
((
LPCREATESTRUCTA
)
lParam
)
->
hwndParent
;
infoPtr
->
uNumItem
=
0
;
...
...
@@ -1335,7 +1335,7 @@ HEADER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
ImageList_Destroy
(
infoPtr
->
himl
);
Free
(
infoPtr
);
SetWindowLongA
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
A
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/hotkey.c
View file @
cdb263e5
...
...
@@ -51,7 +51,7 @@ typedef struct tagHOTKEY_INFO
WCHAR
strNone
[
15
];
/* hope its long enough ... */
}
HOTKEY_INFO
;
#define HOTKEY_GetInfoPtr(hwnd) ((HOTKEY_INFO *)GetWindowLongA (hwnd, 0))
#define HOTKEY_GetInfoPtr(hwnd) ((HOTKEY_INFO *)GetWindowLong
Ptr
A (hwnd, 0))
static
const
WCHAR
HOTKEY_plussep
[]
=
{
' '
,
'+'
,
' '
};
...
...
@@ -217,7 +217,7 @@ HOTKEY_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* allocate memory for info structure */
infoPtr
=
(
HOTKEY_INFO
*
)
Alloc
(
sizeof
(
HOTKEY_INFO
));
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize info structure */
infoPtr
->
HotKey
=
infoPtr
->
InvComb
=
infoPtr
->
InvMod
=
infoPtr
->
CurrMod
=
0
;
...
...
@@ -242,7 +242,7 @@ HOTKEY_Destroy (HOTKEY_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
HWND
hwnd
=
infoPtr
->
hwndSelf
;
/* free hotkey info data */
Free
(
infoPtr
);
SetWindowLongW
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/ipaddress.c
View file @
cdb263e5
...
...
@@ -71,7 +71,7 @@ typedef struct
#define POS_SELALL 3
#define IP_SUBCLASS_PROP "CCIP32SubclassInfo"
#define IPADDRESS_GetInfoPtr(hwnd) ((IPADDRESS_INFO *)GetWindowLongW (hwnd, 0))
#define IPADDRESS_GetInfoPtr(hwnd) ((IPADDRESS_INFO *)GetWindowLong
Ptr
W (hwnd, 0))
static
LRESULT
CALLBACK
...
...
@@ -84,7 +84,7 @@ static LRESULT IPADDRESS_Notify (IPADDRESS_INFO *infoPtr, UINT command)
TRACE
(
"(command=%x)
\n
"
,
command
);
return
SendMessageW
(
infoPtr
->
Notify
,
WM_COMMAND
,
MAKEWPARAM
(
GetWindowLong
W
(
hwnd
,
GWL
_ID
),
command
),
(
LPARAM
)
hwnd
);
MAKEWPARAM
(
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
),
command
),
(
LPARAM
)
hwnd
);
}
static
INT
IPADDRESS_IPNotify
(
IPADDRESS_INFO
*
infoPtr
,
INT
field
,
INT
value
)
...
...
@@ -94,7 +94,7 @@ static INT IPADDRESS_IPNotify (IPADDRESS_INFO *infoPtr, INT field, INT value)
TRACE
(
"(field=%x, value=%d)
\n
"
,
field
,
value
);
nmip
.
hdr
.
hwndFrom
=
infoPtr
->
Self
;
nmip
.
hdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
nmip
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
nmip
.
hdr
.
code
=
IPN_FIELDCHANGED
;
nmip
.
iField
=
field
;
...
...
@@ -164,7 +164,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, LPCREATESTRUCTA lpCreate)
infoPtr
=
(
IPADDRESS_INFO
*
)
Alloc
(
sizeof
(
IPADDRESS_INFO
));
if
(
!
infoPtr
)
return
-
1
;
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
GetClientRect
(
hwnd
,
&
rcClient
);
...
...
@@ -187,11 +187,11 @@ static LRESULT IPADDRESS_Create (HWND hwnd, LPCREATESTRUCTA lpCreate)
CreateWindowW
(
EDIT
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
ES_CENTER
,
edit
.
left
,
edit
.
top
,
edit
.
right
-
edit
.
left
,
edit
.
bottom
-
edit
.
top
,
hwnd
,
(
HMENU
)
1
,
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
),
NULL
);
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
),
NULL
);
SetPropA
(
part
->
EditHwnd
,
IP_SUBCLASS_PROP
,
hwnd
);
part
->
OrigProc
=
(
WNDPROC
)
SetWindowLong
W
(
part
->
EditHwnd
,
GWL
_WNDPROC
,
(
LONG
)
IPADDRESS_SubclassProc
);
SetWindowLong
PtrW
(
part
->
EditHwnd
,
GWLP
_WNDPROC
,
(
DWORD_PTR
)
IPADDRESS_SubclassProc
);
}
return
0
;
...
...
@@ -206,10 +206,10 @@ static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
IPPART_INFO
*
part
=
&
infoPtr
->
Part
[
i
];
SetWindowLong
W
(
part
->
EditHwnd
,
GWL_WNDPROC
,
(
LONG
)
part
->
OrigProc
);
SetWindowLong
PtrW
(
part
->
EditHwnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
part
->
OrigProc
);
}
SetWindowLongW
(
infoPtr
->
Self
,
0
,
0
);
SetWindowLong
Ptr
W
(
infoPtr
->
Self
,
0
,
0
);
Free
(
infoPtr
);
return
0
;
}
...
...
dlls/comctl32/listview.c
View file @
cdb263e5
...
...
@@ -716,7 +716,7 @@ static LRESULT notify_hdr(LISTVIEW_INFO *infoPtr, INT code, LPNMHDR pnmh)
TRACE
(
"(code=%d)
\n
"
,
code
);
pnmh
->
hwndFrom
=
infoPtr
->
hwndSelf
;
pnmh
->
idFrom
=
GetWindowLong
W
(
infoPtr
->
hwndSelf
,
GWL
_ID
);
pnmh
->
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
hwndSelf
,
GWLP
_ID
);
pnmh
->
code
=
code
;
result
=
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
pnmh
->
idFrom
,
(
LPARAM
)
pnmh
);
...
...
@@ -1731,7 +1731,7 @@ static void LISTVIEW_ShowFocusRect(LISTVIEW_INFO *infoPtr, BOOL fShow)
ZeroMemory
(
&
dis
,
sizeof
(
dis
));
dis
.
CtlType
=
ODT_LISTVIEW
;
dis
.
CtlID
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL
_ID
);
dis
.
CtlID
=
(
UINT
)
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP
_ID
);
dis
.
itemID
=
item
.
iItem
;
dis
.
itemAction
=
ODA_FOCUS
;
if
(
fShow
)
dis
.
itemState
|=
ODS_FOCUS
;
...
...
@@ -3689,7 +3689,7 @@ postpaint:
*/
static
void
LISTVIEW_RefreshOwnerDraw
(
LISTVIEW_INFO
*
infoPtr
,
ITERATOR
*
i
,
HDC
hdc
,
DWORD
cdmode
)
{
UINT
uID
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL
_ID
);
UINT
uID
=
(
UINT
)
GetWindowLongPtrW
(
infoPtr
->
hwndSelf
,
GWLP
_ID
);
DWORD
cditemmode
=
CDRF_DODEFAULT
;
NMLVCUSTOMDRAW
nmlvcd
;
POINT
Origin
,
Position
;
...
...
@@ -7378,7 +7378,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
=
(
LISTVIEW_INFO
*
)
Alloc
(
sizeof
(
LISTVIEW_INFO
));
if
(
!
infoPtr
)
return
-
1
;
SetWindowLong
W
(
hwnd
,
0
,
(
LONG
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
infoPtr
->
hwndSelf
=
hwnd
;
infoPtr
->
dwStyle
=
lpcs
->
style
;
...
...
@@ -8180,7 +8180,7 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr)
if
(
infoPtr
->
hDefaultFont
)
DeleteObject
(
infoPtr
->
hDefaultFont
);
if
(
infoPtr
->
clrBk
!=
CLR_NONE
)
DeleteObject
(
infoPtr
->
hBkBrush
);
SetWindowLongW
(
infoPtr
->
hwndSelf
,
0
,
0
);
SetWindowLong
Ptr
W
(
infoPtr
->
hwndSelf
,
0
,
0
);
/* free listview info pointer*/
Free
(
infoPtr
);
...
...
@@ -8772,7 +8772,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
static
LRESULT
WINAPI
LISTVIEW_WindowProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
TRACE
(
"(uMsg=%x wParam=%x lParam=%lx)
\n
"
,
uMsg
,
wParam
,
lParam
);
...
...
@@ -9380,7 +9380,7 @@ static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lP
*/
static
LRESULT
EditLblWndProcT
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
isW
)
{
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLongW
(
GetParent
(
hwnd
),
0
);
LISTVIEW_INFO
*
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLong
Ptr
W
(
GetParent
(
hwnd
),
0
);
BOOL
cancel
=
FALSE
;
TRACE
(
"(hwnd=%p, uMsg=%x, wParam=%x, lParam=%lx, isW=%d)
\n
"
,
...
...
@@ -9398,7 +9398,7 @@ static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara
{
WNDPROC
editProc
=
infoPtr
->
EditWndProc
;
infoPtr
->
EditWndProc
=
0
;
SetWindowLong
W
(
hwnd
,
GWL_WNDPROC
,
(
LONG
)
editProc
);
SetWindowLong
PtrW
(
hwnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
editProc
);
return
CallWindowProcT
(
editProc
,
hwnd
,
uMsg
,
wParam
,
lParam
,
isW
);
}
...
...
@@ -9499,7 +9499,7 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, DWORD style,
HDC
hdc
;
HDC
hOldFont
=
0
;
TEXTMETRICW
textMetric
;
HINSTANCE
hinst
=
(
HINSTANCE
)
GetWindowLong
W
(
infoPtr
->
hwndSelf
,
GWL
_HINSTANCE
);
HINSTANCE
hinst
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
infoPtr
->
hwndSelf
,
GWLP
_HINSTANCE
);
TRACE
(
"(text=%s, ..., isW=%d)
\n
"
,
debugtext_t
(
text
,
isW
),
isW
);
...
...
@@ -9529,8 +9529,8 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, DWORD style,
if
(
!
hedit
)
return
0
;
infoPtr
->
EditWndProc
=
(
WNDPROC
)
(
isW
?
SetWindowLong
W
(
hedit
,
GWL_WNDPROC
,
(
LONG
)
EditLblWndProcW
)
:
SetWindowLong
A
(
hedit
,
GWL_WNDPROC
,
(
LONG
)
EditLblWndProcA
)
);
(
isW
?
SetWindowLong
PtrW
(
hedit
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
EditLblWndProcW
)
:
SetWindowLong
PtrA
(
hedit
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
EditLblWndProcA
)
);
SendMessageW
(
hedit
,
WM_SETFONT
,
(
WPARAM
)
infoPtr
->
hFont
,
FALSE
);
...
...
dlls/comctl32/monthcal.c
View file @
cdb263e5
...
...
@@ -114,7 +114,7 @@ typedef struct
static
const
int
DayOfWeekTable
[]
=
{
0
,
3
,
2
,
5
,
0
,
3
,
5
,
1
,
4
,
6
,
2
,
4
};
#define MONTHCAL_GetInfoPtr(hwnd) ((MONTHCAL_INFO *)GetWindowLong
A
(hwnd, 0))
#define MONTHCAL_GetInfoPtr(hwnd) ((MONTHCAL_INFO *)GetWindowLong
PtrW
(hwnd, 0))
/* helper functions */
...
...
@@ -1302,7 +1302,7 @@ static void MONTHCAL_GoToNextMonth(HWND hwnd, MONTHCAL_INFO *infoPtr)
int
i
;
nmds
.
nmhdr
.
hwndFrom
=
hwnd
;
nmds
.
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmds
.
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmds
.
nmhdr
.
code
=
MCN_GETDAYSTATE
;
nmds
.
cDayState
=
infoPtr
->
monthRange
;
nmds
.
prgDayState
=
Alloc
(
infoPtr
->
monthRange
*
sizeof
(
MONTHDAYSTATE
));
...
...
@@ -1332,7 +1332,7 @@ static void MONTHCAL_GoToPrevMonth(HWND hwnd, MONTHCAL_INFO *infoPtr)
int
i
;
nmds
.
nmhdr
.
hwndFrom
=
hwnd
;
nmds
.
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmds
.
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmds
.
nmhdr
.
code
=
MCN_GETDAYSTATE
;
nmds
.
cDayState
=
infoPtr
->
monthRange
;
nmds
.
prgDayState
=
Alloc
...
...
@@ -1491,7 +1491,7 @@ MONTHCAL_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
MONTHCAL_SetCurSel
(
hwnd
,
0
,(
LPARAM
)
&
selArray
);
TRACE
(
"MCHT_CALENDARDATE
\n
"
);
nmsc
.
nmhdr
.
hwndFrom
=
hwnd
;
nmsc
.
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmsc
.
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmsc
.
nmhdr
.
code
=
MCN_SELCHANGE
;
MONTHCAL_CopyTime
(
&
infoPtr
->
minSel
,
&
nmsc
.
stSelStart
);
MONTHCAL_CopyTime
(
&
infoPtr
->
maxSel
,
&
nmsc
.
stSelEnd
);
...
...
@@ -1559,7 +1559,7 @@ MONTHCAL_LButtonUp(HWND hwnd, WPARAM wParam, LPARAM lParam)
return
TRUE
;
}
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
TRACE
(
"Sent notification from %p to %p
\n
"
,
hwnd
,
infoPtr
->
hwndNotify
);
...
...
@@ -1571,7 +1571,7 @@ MONTHCAL_LButtonUp(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* only send MCN_SELECT if currently displayed month's day was selected */
if
(
hit
==
MCHT_CALENDARDATE
)
{
nmsc
.
nmhdr
.
hwndFrom
=
hwnd
;
nmsc
.
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmsc
.
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmsc
.
nmhdr
.
code
=
MCN_SELECT
;
MONTHCAL_CopyTime
(
&
infoPtr
->
minSel
,
&
nmsc
.
stSelStart
);
MONTHCAL_CopyTime
(
&
infoPtr
->
maxSel
,
&
nmsc
.
stSelEnd
);
...
...
@@ -1877,13 +1877,13 @@ MONTHCAL_Create(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* allocate memory for info structure */
infoPtr
=
(
MONTHCAL_INFO
*
)
Alloc
(
sizeof
(
MONTHCAL_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
if
(
infoPtr
==
NULL
)
{
ERR
(
"could not allocate info memory!
\n
"
);
return
0
;
}
if
((
MONTHCAL_INFO
*
)
GetWindowLong
A
(
hwnd
,
0
)
!=
infoPtr
)
{
if
((
MONTHCAL_INFO
*
)
GetWindowLong
PtrW
(
hwnd
,
0
)
!=
infoPtr
)
{
ERR
(
"pointer assignment error!
\n
"
);
return
0
;
}
...
...
@@ -1934,7 +1934,7 @@ MONTHCAL_Destroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
infoPtr
->
monthdayState
)
Free
(
infoPtr
->
monthdayState
);
Free
(
infoPtr
);
SetWindowLong
A
(
hwnd
,
0
,
0
);
SetWindowLong
PtrW
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/nativefont.c
View file @
cdb263e5
...
...
@@ -45,7 +45,7 @@ typedef struct
DWORD
dwDummy
;
/* just to keep the compiler happy ;-) */
}
NATIVEFONT_INFO
;
#define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO *)GetWindowLong
A
(hwnd, 0))
#define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO *)GetWindowLong
PtrW
(hwnd, 0))
static
LRESULT
...
...
@@ -55,7 +55,7 @@ NATIVEFONT_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* allocate memory for info structure */
infoPtr
=
(
NATIVEFONT_INFO
*
)
Alloc
(
sizeof
(
NATIVEFONT_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize info structure */
...
...
@@ -75,7 +75,7 @@ NATIVEFONT_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* free comboex info data */
Free
(
infoPtr
);
SetWindowLong
A
(
hwnd
,
0
,
0
);
SetWindowLong
PtrW
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/pager.c
View file @
cdb263e5
...
...
@@ -59,7 +59,7 @@ typedef struct
INT
direction
;
/* direction of the scroll, (e.g. PGF_SCROLLUP) */
}
PAGER_INFO
;
#define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO *)GetWindowLong
A
(hwnd, 0))
#define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO *)GetWindowLong
PtrW
(hwnd, 0))
#define PAGER_IsHorizontal(hwnd) ((GetWindowLongA (hwnd, GWL_STYLE) & PGS_HORZ))
#define MIN_ARROW_WIDTH 8
...
...
@@ -330,7 +330,7 @@ PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth)
NMPGCALCSIZE
nmpgcs
;
ZeroMemory
(
&
nmpgcs
,
sizeof
(
NMPGCALCSIZE
));
nmpgcs
.
hdr
.
hwndFrom
=
hwnd
;
nmpgcs
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmpgcs
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmpgcs
.
hdr
.
code
=
PGN_CALCSIZE
;
nmpgcs
.
dwFlag
=
getWidth
?
PGF_CALCWIDTH
:
PGF_CALCHEIGHT
;
nmpgcs
.
iWidth
=
getWidth
?
*
size
:
0
;
...
...
@@ -777,7 +777,7 @@ PAGER_Scroll(HWND hwnd, INT dir)
{
ZeroMemory
(
&
nmpgScroll
,
sizeof
(
NMPGSCROLL
));
nmpgScroll
.
hdr
.
hwndFrom
=
hwnd
;
nmpgScroll
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmpgScroll
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmpgScroll
.
hdr
.
code
=
PGN_SCROLL
;
GetWindowRect
(
hwnd
,
&
rcWnd
);
...
...
@@ -841,7 +841,7 @@ PAGER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* allocate memory for info structure */
infoPtr
=
(
PAGER_INFO
*
)
Alloc
(
sizeof
(
PAGER_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* set default settings */
infoPtr
->
hwndChild
=
NULL
;
...
...
@@ -882,7 +882,7 @@ PAGER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
/* free pager info data */
Free
(
infoPtr
);
SetWindowLong
A
(
hwnd
,
0
,
0
);
SetWindowLong
PtrW
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
@@ -1178,7 +1178,7 @@ PAGER_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
NMHDR
nmhdr
;
ZeroMemory
(
&
nmhdr
,
sizeof
(
NMHDR
));
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
...
...
@@ -1268,7 +1268,7 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
NMHDR
nmhdr
;
ZeroMemory
(
&
nmhdr
,
sizeof
(
NMHDR
));
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
...
...
dlls/comctl32/progress.c
View file @
cdb263e5
...
...
@@ -499,7 +499,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
TRACE
(
"hwnd=%p msg=%04x wparam=%x lParam=%lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
infoPtr
=
(
PROGRESS_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
infoPtr
=
(
PROGRESS_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
if
(
!
infoPtr
&&
message
!=
WM_CREATE
)
return
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -518,7 +518,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
/* allocate memory for info struct */
infoPtr
=
(
PROGRESS_INFO
*
)
Alloc
(
sizeof
(
PROGRESS_INFO
));
if
(
!
infoPtr
)
return
-
1
;
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize the info struct */
infoPtr
->
Self
=
hwnd
;
...
...
@@ -538,7 +538,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
case
WM_DESTROY
:
TRACE
(
"Progress Ctrl destruction, hwnd=%p
\n
"
,
hwnd
);
Free
(
infoPtr
);
SetWindowLongW
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
0
);
return
0
;
case
WM_GETFONT
:
...
...
dlls/comctl32/propsheet.c
View file @
cdb263e5
...
...
@@ -3244,11 +3244,11 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/*
* psInfo->hwnd is not being used by WINE code - it exists
* for compatibility with "real" Windoze. The same about
* SetWindowLong - WINE is only using the PropSheetInfoStr
* SetWindowLong
Ptr
- WINE is only using the PropSheetInfoStr
* property.
*/
psInfo
->
hwnd
=
hwnd
;
SetWindowLong
W
(
hwnd
,
DWL_USER
,(
LONG
)
psInfo
);
SetWindowLong
PtrW
(
hwnd
,
DWLP_USER
,
(
DWORD_PTR
)
psInfo
);
/* set up the Next and Back buttons by default */
PROPSHEET_SetWizButtons
(
hwnd
,
PSWIZB_BACK
|
PSWIZB_NEXT
);
...
...
@@ -3382,7 +3382,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if
(
pnmh
->
code
==
TCN_SELCHANGING
)
{
BOOL
bRet
=
PROPSHEET_CanSetCurSel
(
hwnd
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
!
bRet
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
!
bRet
);
return
TRUE
;
}
...
...
@@ -3398,7 +3398,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if
(
psInfo
->
activeValid
&&
psInfo
->
active_page
!=
-
1
)
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
SetWindowLong
W
(
hwnd
,
DWL_MSGRESULT
,
(
LONG
)
hwndPage
);
SetWindowLong
PtrW
(
hwnd
,
DWLP_MSGRESULT
,
(
DWORD_PTR
)
hwndPage
);
return
TRUE
;
}
...
...
@@ -3415,7 +3415,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HWND
hwndTabCtrl
=
GetDlgItem
(
hwnd
,
IDC_TABCONTROL
);
SetWindowLong
W
(
hwnd
,
DWL_MSGRESULT
,
(
LONG
)
hwndTabCtrl
);
SetWindowLong
PtrW
(
hwnd
,
DWLP_MSGRESULT
,
(
DWORD_PTR
)
hwndTabCtrl
);
return
TRUE
;
}
...
...
@@ -3433,7 +3433,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
(
HPROPSHEETPAGE
)
lParam
);
}
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3481,7 +3481,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
BOOL
msgResult
=
PROPSHEET_Apply
(
hwnd
,
0
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3490,7 +3490,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LRESULT
msgResult
=
PROPSHEET_QuerySiblings
(
hwnd
,
wParam
,
lParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3507,7 +3507,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL
msgResult
=
PROPSHEET_AddPage
(
hwnd
,
(
HPROPSHEETPAGE
)
lParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3519,7 +3519,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
PSM_ISDIALOGMESSAGE
:
{
BOOL
msgResult
=
PROPSHEET_IsDialogMessage
(
hwnd
,
(
LPMSG
)
lParam
);
SetWindowLong
A
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3546,7 +3546,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
PSM_INSERTPAGE
:
{
BOOL
msgResult
=
PROPSHEET_InsertPage
(
hwnd
,
(
HPROPSHEETPAGE
)
wParam
,
(
HPROPSHEETPAGE
)
lParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
@@ -3569,56 +3569,56 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
PSM_HWNDTOINDEX
:
{
LRESULT
msgResult
=
PROPSHEET_HwndToIndex
(
hwnd
,
(
HWND
)
wParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_INDEXTOHWND
:
{
LRESULT
msgResult
=
PROPSHEET_IndexToHwnd
(
hwnd
,
(
int
)
wParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_PAGETOINDEX
:
{
LRESULT
msgResult
=
PROPSHEET_PageToIndex
(
hwnd
,
(
HPROPSHEETPAGE
)
wParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_INDEXTOPAGE
:
{
LRESULT
msgResult
=
PROPSHEET_IndexToPage
(
hwnd
,
(
int
)
wParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_IDTOINDEX
:
{
LRESULT
msgResult
=
PROPSHEET_IdToIndex
(
hwnd
,
(
int
)
lParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_INDEXTOID
:
{
LRESULT
msgResult
=
PROPSHEET_IndexToId
(
hwnd
,
(
int
)
wParam
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_GETRESULT
:
{
LRESULT
msgResult
=
PROPSHEET_GetResult
(
hwnd
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
case
PSM_RECALCPAGESIZES
:
{
LRESULT
msgResult
=
PROPSHEET_RecalcPageSizes
(
hwnd
);
SetWindowLong
W
(
hwnd
,
DWL
_MSGRESULT
,
msgResult
);
SetWindowLong
PtrW
(
hwnd
,
DWLP
_MSGRESULT
,
msgResult
);
return
TRUE
;
}
...
...
dlls/comctl32/rebar.c
View file @
cdb263e5
...
...
@@ -333,7 +333,7 @@ typedef struct
else b->rcBand.left += (i); } while(0)
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)GetWindowLong
A
(hwnd, 0))
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)GetWindowLong
PtrW
(hwnd, 0))
/* "constant values" retrieved when DLL was initialized */
...
...
@@ -3841,7 +3841,7 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
DeleteObject
(
infoPtr
->
hcurVert
);
DeleteObject
(
infoPtr
->
hcurDrag
);
if
(
infoPtr
->
hDefaultFont
)
DeleteObject
(
infoPtr
->
hDefaultFont
);
SetWindowLong
A
(
infoPtr
->
hwndSelf
,
0
,
0
);
SetWindowLong
PtrW
(
infoPtr
->
hwndSelf
,
0
,
0
);
/* free rebar info data */
Free
(
infoPtr
);
...
...
@@ -4124,7 +4124,7 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* allocate memory for info structure */
infoPtr
=
(
REBAR_INFO
*
)
Alloc
(
sizeof
(
REBAR_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize info structure - initial values are 0 */
infoPtr
->
clrBk
=
CLR_NONE
;
...
...
dlls/comctl32/status.c
View file @
cdb263e5
...
...
@@ -91,7 +91,7 @@ typedef struct
#define VERT_BORDER 2
#define HORZ_GAP 2
#define STATUSBAR_GetInfoPtr(hwnd) ((STATUSWINDOWINFO *)GetWindowLongW (hwnd, 0))
#define STATUSBAR_GetInfoPtr(hwnd) ((STATUSWINDOWINFO *)GetWindowLong
Ptr
W (hwnd, 0))
/* prototype */
static
void
...
...
@@ -165,7 +165,7 @@ STATUSBAR_DrawPart (HDC hdc, const STATUSWINDOWPART *part, const STATUSWINDOWINF
{
DRAWITEMSTRUCT
dis
;
dis
.
CtlID
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
dis
.
CtlID
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
dis
.
itemID
=
itemID
;
dis
.
hwndItem
=
infoPtr
->
Self
;
dis
.
hDC
=
hdc
;
...
...
@@ -777,7 +777,7 @@ STATUSBAR_Simple (STATUSWINDOWINFO *infoPtr, BOOL simple)
/* send notification */
nmhdr
.
hwndFrom
=
infoPtr
->
Self
;
nmhdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
nmhdr
.
code
=
SBN_SIMPLEMODECHANGE
;
SendMessageW
(
infoPtr
->
Notify
,
WM_NOTIFY
,
0
,
(
LPARAM
)
&
nmhdr
);
InvalidateRect
(
infoPtr
->
Self
,
NULL
,
FALSE
);
...
...
@@ -807,7 +807,7 @@ STATUSBAR_WMDestroy (STATUSWINDOWINFO *infoPtr)
if
(
infoPtr
->
hwndToolTip
)
DestroyWindow
(
infoPtr
->
hwndToolTip
);
SetWindowLongW
(
infoPtr
->
Self
,
0
,
0
);
SetWindowLong
Ptr
W
(
infoPtr
->
Self
,
0
,
0
);
Free
(
infoPtr
);
return
0
;
}
...
...
@@ -826,7 +826,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
TRACE
(
"
\n
"
);
infoPtr
=
(
STATUSWINDOWINFO
*
)
Alloc
(
sizeof
(
STATUSWINDOWINFO
));
if
(
!
infoPtr
)
goto
create_fail
;
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
infoPtr
->
Self
=
hwnd
;
infoPtr
->
Notify
=
lpCreate
->
hwndParent
;
...
...
@@ -908,13 +908,13 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
CreateWindowExW
(
0
,
TOOLTIPS_CLASSW
,
NULL
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hwnd
,
0
,
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
),
NULL
);
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
),
NULL
);
if
(
infoPtr
->
hwndToolTip
)
{
NMTOOLTIPSCREATED
nmttc
;
nmttc
.
hdr
.
hwndFrom
=
hwnd
;
nmttc
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmttc
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmttc
.
hdr
.
code
=
NM_TOOLTIPSCREATED
;
nmttc
.
hwndToolTips
=
infoPtr
->
hwndToolTip
;
...
...
@@ -1106,7 +1106,7 @@ STATUSBAR_SendNotify (HWND hwnd, UINT code)
TRACE
(
"code %04x
\n
"
,
code
);
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
code
;
SendMessageW
(
infoPtr
->
Notify
,
WM_NOTIFY
,
0
,
(
LPARAM
)
&
nmhdr
);
return
0
;
...
...
dlls/comctl32/syslink.c
View file @
cdb263e5
...
...
@@ -1223,7 +1223,7 @@ static LRESULT SYSLINK_SendParentNotify (SYSLINK_INFO *infoPtr, UINT code, PDOC_
NMLINK
nml
;
nml
.
hdr
.
hwndFrom
=
infoPtr
->
Self
;
nml
.
hdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
nml
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
nml
.
hdr
.
code
=
code
;
nml
.
item
.
mask
=
0
;
...
...
@@ -1465,7 +1465,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
TRACE
(
"hwnd=%p msg=%04x wparam=%x lParam=%lx
\n
"
,
hwnd
,
message
,
wParam
,
lParam
);
infoPtr
=
(
SYSLINK_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
infoPtr
=
(
SYSLINK_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
if
(
!
infoPtr
&&
message
!=
WM_CREATE
)
return
DefWindowProcW
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -1618,7 +1618,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
/* allocate memory for info struct */
infoPtr
=
(
SYSLINK_INFO
*
)
SYSLINK_Alloc
(
sizeof
(
SYSLINK_INFO
));
if
(
!
infoPtr
)
return
-
1
;
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize the info struct */
infoPtr
->
Self
=
hwnd
;
...
...
@@ -1639,7 +1639,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
TRACE
(
"SysLink Ctrl destruction, hwnd=%p
\n
"
,
hwnd
);
SYSLINK_ClearDoc
(
infoPtr
);
SYSLINK_Free
(
infoPtr
);
SetWindowLongW
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
0
);
return
0
;
default:
...
...
dlls/comctl32/tab.c
View file @
cdb263e5
...
...
@@ -112,7 +112,7 @@ typedef struct
#define FLAT_BTN_SPACINGX 8
#define DEFAULT_TAB_WIDTH 96
#define TAB_GetInfoPtr(hwnd) ((TAB_INFO *)GetWindowLong
A
(hwnd,0))
#define TAB_GetInfoPtr(hwnd) ((TAB_INFO *)GetWindowLong
PtrW
(hwnd,0))
/******************************************************************************
* Hot-tracking timer constants
...
...
@@ -136,7 +136,7 @@ TAB_SendSimpleNotify (HWND hwnd, UINT code)
NMHDR
nmhdr
;
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
code
;
return
(
BOOL
)
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
...
...
@@ -1648,7 +1648,7 @@ TAB_DrawItemInterior
/*
* get the control id
*/
id
=
GetWindowLongA
(
hwnd
,
GWL
_ID
);
id
=
(
UINT
)
GetWindowLongPtrW
(
hwnd
,
GWLP
_ID
);
/*
* put together the DRAWITEMSTRUCT
...
...
@@ -3130,12 +3130,12 @@ TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
NMTOOLTIPSCREATED
nmttc
;
nmttc
.
hdr
.
hwndFrom
=
hwnd
;
nmttc
.
hdr
.
idFrom
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
nmttc
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmttc
.
hdr
.
code
=
NM_TOOLTIPSCREATED
;
nmttc
.
hwndToolTips
=
infoPtr
->
hwndToolTip
;
SendMessageA
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
GetWindowLong
A
(
hwnd
,
GWL
_ID
),
(
LPARAM
)
&
nmttc
);
(
WPARAM
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
),
(
LPARAM
)
&
nmttc
);
}
}
...
...
dlls/comctl32/tooltips.c
View file @
cdb263e5
...
...
@@ -129,7 +129,7 @@ typedef struct
#define ID_TIMERLEAVE 3
/* tool leave timer */
#define TOOLTIPS_GetInfoPtr(hWindow) ((TOOLTIPS_INFO *)GetWindowLong
A
(hWindow, 0))
#define TOOLTIPS_GetInfoPtr(hWindow) ((TOOLTIPS_INFO *)GetWindowLong
PtrW
(hWindow, 0))
/* offsets from window edge to start of text */
#define NORMAL_TEXT_MARGIN 2
...
...
@@ -2138,7 +2138,7 @@ TOOLTIPS_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
/* allocate memory for info structure */
infoPtr
=
(
TOOLTIPS_INFO
*
)
Alloc
(
sizeof
(
TOOLTIPS_INFO
));
SetWindowLong
A
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize info structure */
infoPtr
->
bActive
=
TRUE
;
...
...
@@ -2201,7 +2201,7 @@ TOOLTIPS_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* free tool tips info data */
Free
(
infoPtr
);
SetWindowLong
A
(
hwnd
,
0
,
0
);
SetWindowLong
PtrW
(
hwnd
,
0
,
0
);
return
0
;
}
...
...
dlls/comctl32/trackbar.c
View file @
cdb263e5
...
...
@@ -112,7 +112,7 @@ static LRESULT notify_hdr(TRACKBAR_INFO *infoPtr, INT code, LPNMHDR pnmh)
TRACE
(
"(code=%d)
\n
"
,
code
);
pnmh
->
hwndFrom
=
infoPtr
->
hwndSelf
;
pnmh
->
idFrom
=
GetWindowLong
W
(
infoPtr
->
hwndSelf
,
GWL
_ID
);
pnmh
->
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
hwndSelf
,
GWLP
_ID
);
pnmh
->
code
=
code
;
result
=
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
pnmh
->
idFrom
,
(
LPARAM
)
pnmh
);
...
...
@@ -809,7 +809,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
ZeroMemory
(
&
nmcd
,
sizeof
(
nmcd
));
nmcd
.
hdr
.
hwndFrom
=
infoPtr
->
hwndSelf
;
nmcd
.
hdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
hwndSelf
,
GWL
_ID
);
nmcd
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
hwndSelf
,
GWLP
_ID
);
nmcd
.
hdr
.
code
=
NM_CUSTOMDRAW
;
nmcd
.
hdc
=
hdc
;
...
...
@@ -1339,7 +1339,7 @@ TRACKBAR_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
infoPtr
=
(
TRACKBAR_INFO
*
)
Alloc
(
sizeof
(
TRACKBAR_INFO
));
if
(
!
infoPtr
)
return
-
1
;
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* set default values */
infoPtr
->
hwndSelf
=
hwnd
;
...
...
@@ -1401,7 +1401,7 @@ TRACKBAR_Destroy (TRACKBAR_INFO *infoPtr)
DestroyWindow
(
infoPtr
->
hwndToolTip
);
Free
(
infoPtr
);
SetWindowLongW
(
infoPtr
->
hwndSelf
,
0
,
0
);
SetWindowLong
Ptr
W
(
infoPtr
->
hwndSelf
,
0
,
0
);
return
0
;
}
...
...
@@ -1635,7 +1635,7 @@ TRACKBAR_KeyUp (TRACKBAR_INFO *infoPtr, INT nVirtKey, DWORD lKeyData)
static
LRESULT
WINAPI
TRACKBAR_WindowProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TRACKBAR_INFO
*
infoPtr
=
(
TRACKBAR_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
TRACKBAR_INFO
*
infoPtr
=
(
TRACKBAR_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
TRACE
(
"hwnd=%p msg=%x wparam=%x lparam=%lx
\n
"
,
hwnd
,
uMsg
,
wParam
,
lParam
);
...
...
dlls/comctl32/treeview.c
View file @
cdb263e5
...
...
@@ -225,7 +225,7 @@ static void TREEVIEW_VerifyTree(TREEVIEW_INFO *infoPtr);
static
TREEVIEW_INFO
*
TREEVIEW_GetInfoPtr
(
HWND
hwnd
)
{
return
(
TREEVIEW_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
return
(
TREEVIEW_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
}
/* Don't call this. Nothing wants an item index. */
...
...
@@ -458,7 +458,7 @@ TREEVIEW_SendSimpleNotify(TREEVIEW_INFO *infoPtr, UINT code)
TRACE
(
"%d
\n
"
,
code
);
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmhdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
code
=
get_notifycode
(
infoPtr
,
code
);
return
(
BOOL
)
TREEVIEW_SendRealNotify
(
infoPtr
,
...
...
@@ -513,7 +513,7 @@ TREEVIEW_SendTreeviewNotify(TREEVIEW_INFO *infoPtr, UINT code, UINT action,
ZeroMemory
(
&
nmhdr
,
sizeof
(
NMTREEVIEWA
));
nmhdr
.
hdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
code
);
nmhdr
.
action
=
action
;
...
...
@@ -547,7 +547,7 @@ TREEVIEW_SendTreeviewDnDNotify(TREEVIEW_INFO *infoPtr, UINT code,
TRACE
(
"code:%d dragitem:%p
\n
"
,
code
,
dragItem
);
nmhdr
.
hdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmhdr
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmhdr
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
code
);
nmhdr
.
action
=
0
;
nmhdr
.
itemNew
.
mask
=
TVIF_STATE
|
TVIF_PARAM
|
TVIF_HANDLE
;
...
...
@@ -576,7 +576,7 @@ TREEVIEW_SendCustomDrawNotify(TREEVIEW_INFO *infoPtr, DWORD dwDrawStage,
nmcd
=
&
nmcdhdr
.
nmcd
;
nmcd
->
hdr
.
hwndFrom
=
hwnd
;
nmcd
->
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmcd
->
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmcd
->
hdr
.
code
=
NM_CUSTOMDRAW
;
nmcd
->
dwDrawStage
=
dwDrawStage
;
nmcd
->
hdc
=
hdc
;
...
...
@@ -620,7 +620,7 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVIEW_INFO *infoPtr, HDC hdc,
nmcd
=
&
nmcdhdr
.
nmcd
;
nmcd
->
hdr
.
hwndFrom
=
hwnd
;
nmcd
->
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
nmcd
->
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
nmcd
->
hdr
.
code
=
NM_CUSTOMDRAW
;
nmcd
->
dwDrawStage
=
dwDrawStage
;
nmcd
->
hdc
=
hdc
;
...
...
@@ -653,7 +653,7 @@ TREEVIEW_BeginLabelEditNotify(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *editItem)
BOOL
ret
;
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
tvdi
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_BEGINLABELEDITW
);
TREEVIEW_TVItemFromItem
(
infoPtr
,
TVIF_HANDLE
|
TVIF_STATE
|
TVIF_PARAM
|
TVIF_TEXT
,
...
...
@@ -680,7 +680,7 @@ TREEVIEW_UpdateDispInfo(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if
(
mask
==
0
)
return
;
callback
.
hdr
.
hwndFrom
=
hwnd
;
callback
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
callback
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
callback
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_GETDISPINFOW
);
/* 'state' always contains valid value, as well as 'lParam'.
...
...
@@ -3463,7 +3463,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
HWND
hwndEdit
;
SIZE
sz
;
TREEVIEW_ITEM
*
editItem
=
hItem
;
HINSTANCE
hinst
=
(
HINSTANCE
)
GetWindowLong
W
(
hwnd
,
GWL
_HINSTANCE
);
HINSTANCE
hinst
=
(
HINSTANCE
)
GetWindowLong
PtrW
(
hwnd
,
GWLP
_HINSTANCE
);
HDC
hdc
;
HFONT
hOldFont
=
0
;
TEXTMETRICW
textMetric
;
...
...
@@ -3530,8 +3530,8 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
SendMessageW
(
hwndEdit
,
WM_SETFONT
,
(
WPARAM
)
TREEVIEW_FontForItem
(
infoPtr
,
editItem
),
FALSE
);
infoPtr
->
wpEditOrig
=
(
WNDPROC
)
SetWindowLong
W
(
hwndEdit
,
GWL
_WNDPROC
,
(
DWORD
)
infoPtr
->
wpEditOrig
=
(
WNDPROC
)
SetWindowLong
PtrW
(
hwndEdit
,
GWLP
_WNDPROC
,
(
DWORD
_PTR
)
TREEVIEW_Edit_SubclassProc
);
if
(
TREEVIEW_BeginLabelEditNotify
(
infoPtr
,
editItem
))
...
...
@@ -3566,7 +3566,7 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
return
FALSE
;
tvdi
.
hdr
.
hwndFrom
=
hwnd
;
tvdi
.
hdr
.
idFrom
=
GetWindowLong
W
(
hwnd
,
GWL
_ID
);
tvdi
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_ID
);
tvdi
.
hdr
.
code
=
get_notifycode
(
infoPtr
,
TVN_ENDLABELEDITW
);
tvdi
.
item
.
mask
=
0
;
tvdi
.
item
.
hItem
=
editedItem
;
...
...
@@ -4190,7 +4190,7 @@ static INT TREEVIEW_ProcessLetterKeys(
if
(
!
hwnd
||
!
charCode
||
!
keyData
)
return
0
;
infoPtr
=
(
TREEVIEW_INFO
*
)
GetWindowLongW
(
hwnd
,
0
);
infoPtr
=
(
TREEVIEW_INFO
*
)
GetWindowLong
Ptr
W
(
hwnd
,
0
);
if
(
!
infoPtr
)
return
0
;
...
...
@@ -4647,7 +4647,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
return
0
;
}
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
infoPtr
->
hwnd
=
hwnd
;
infoPtr
->
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
...
...
@@ -4785,11 +4785,11 @@ TREEVIEW_Destroy(TREEVIEW_INFO *infoPtr)
/* Restore original wndproc */
if
(
infoPtr
->
hwndEdit
)
SetWindowLong
W
(
infoPtr
->
hwndEdit
,
GWL
_WNDPROC
,
(
LONG
)
infoPtr
->
wpEditOrig
);
SetWindowLong
PtrW
(
infoPtr
->
hwndEdit
,
GWLP
_WNDPROC
,
(
DWORD_PTR
)
infoPtr
->
wpEditOrig
);
/* Deassociate treeview from the window before doing anything drastic. */
SetWindowLong
W
(
infoPtr
->
hwnd
,
0
,
(
LONG
)
NULL
);
SetWindowLong
PtrW
(
infoPtr
->
hwnd
,
0
,
(
DWORD_PTR
)
NULL
);
DeleteObject
(
infoPtr
->
hBoldFont
);
Free
(
infoPtr
);
...
...
dlls/comctl32/updown.c
View file @
cdb263e5
...
...
@@ -95,7 +95,7 @@ typedef struct
#define BUDDY_UPDOWN_HWND "buddyUpDownHWND"
#define BUDDY_SUPERCLASS_WNDPROC "buddySupperClassWndProc"
#define UPDOWN_GetInfoPtr(hwnd) ((UPDOWN_INFO *)GetWindowLong
A
(hwnd,0))
#define UPDOWN_GetInfoPtr(hwnd) ((UPDOWN_INFO *)GetWindowLong
PtrW
(hwnd,0))
#define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
static
void
UPDOWN_DoAction
(
UPDOWN_INFO
*
infoPtr
,
int
delta
,
int
action
);
...
...
@@ -491,7 +491,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
when we reset the upDown ctrl buddy to another buddy because it is not
good to break the window proc chain. */
if
(
!
GetPropA
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
))
{
baseWndProc
=
(
WNDPROC
)
SetWindowLong
W
(
bud
,
GWL
_WNDPROC
,
(
LPARAM
)
UPDOWN_Buddy_SubclassProc
);
baseWndProc
=
(
WNDPROC
)
SetWindowLong
PtrW
(
bud
,
GWLP
_WNDPROC
,
(
LPARAM
)
UPDOWN_Buddy_SubclassProc
);
SetPropA
(
bud
,
BUDDY_SUPERCLASS_WNDPROC
,
(
HANDLE
)
baseWndProc
);
}
}
...
...
@@ -572,7 +572,7 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
ni
.
iPos
=
infoPtr
->
CurVal
;
ni
.
iDelta
=
delta
;
ni
.
hdr
.
hwndFrom
=
infoPtr
->
Self
;
ni
.
hdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
ni
.
hdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
ni
.
hdr
.
code
=
UDN_DELTAPOS
;
if
(
!
SendMessageW
(
infoPtr
->
Notify
,
WM_NOTIFY
,
(
WPARAM
)
ni
.
hdr
.
idFrom
,
(
LPARAM
)
&
ni
))
{
/* Parent said: OK to adjust */
...
...
@@ -623,7 +623,7 @@ static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr)
if
(
GetCapture
()
==
infoPtr
->
Self
)
{
NMHDR
hdr
;
hdr
.
hwndFrom
=
infoPtr
->
Self
;
hdr
.
idFrom
=
GetWindowLong
W
(
infoPtr
->
Self
,
GWL
_ID
);
hdr
.
idFrom
=
GetWindowLong
PtrW
(
infoPtr
->
Self
,
GWLP
_ID
);
hdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessageW
(
infoPtr
->
Notify
,
WM_NOTIFY
,
hdr
.
idFrom
,
(
LPARAM
)
&
hdr
);
ReleaseCapture
();
...
...
@@ -725,7 +725,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
case
WM_CREATE
:
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
dwStyle
&
~
WS_BORDER
);
infoPtr
=
(
UPDOWN_INFO
*
)
Alloc
(
sizeof
(
UPDOWN_INFO
));
SetWindowLong
W
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
SetWindowLong
PtrW
(
hwnd
,
0
,
(
DWORD_PTR
)
infoPtr
);
/* initialize the info struct */
infoPtr
->
Self
=
hwnd
;
...
...
@@ -753,7 +753,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
if
(
infoPtr
->
Buddy
)
RemovePropA
(
infoPtr
->
Buddy
,
BUDDY_UPDOWN_HWND
);
Free
(
infoPtr
);
SetWindowLongW
(
hwnd
,
0
,
0
);
SetWindowLong
Ptr
W
(
hwnd
,
0
,
0
);
TRACE
(
"UpDown Ctrl destruction, hwnd=%p
\n
"
,
hwnd
);
break
;
...
...
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