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
e4b2a0bb
Commit
e4b2a0bb
authored
Sep 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Get/SetWindowLongPtr instead of Get/SetWindowLong where
appropriate.
parent
4c34d938
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
43 additions
and
43 deletions
+43
-43
subclass.c
dlls/comctl32/tests/subclass.c
+1
-1
bitmap.c
dlls/gdi/tests/bitmap.c
+1
-1
class.c
dlls/user/tests/class.c
+2
-2
menu.c
dlls/user/tests/menu.c
+1
-1
msg.c
dlls/user/tests/msg.c
+4
-4
win.c
dlls/user/tests/win.c
+0
-0
graph.c
programs/taskmgr/graph.c
+1
-1
perfpage.c
programs/taskmgr/perfpage.c
+4
-4
procpage.c
programs/taskmgr/procpage.c
+1
-1
dialog.c
programs/wineconsole/dialog.c
+9
-9
gdbproxy.c
programs/winedbg/gdbproxy.c
+1
-1
info.c
programs/winedbg/info.c
+5
-5
winefile.c
programs/winefile/winefile.c
+11
-11
winhelp.c
programs/winhelp/winhelp.c
+2
-2
No files found.
dlls/comctl32/tests/subclass.c
View file @
e4b2a0bb
...
...
@@ -234,7 +234,7 @@ static void test_subclass(void)
ok_sequence
(
Sub_AfterDeletedTest
,
"After Deleted"
);
pSetWindowSubclass
(
hwnd
,
WndProcSub
,
2
,
0
);
origProc3
=
(
WNDPROC
)
SetWindowLong
(
hwnd
,
GWL
_WNDPROC
,
(
LONG
)
WndProc3
);
origProc3
=
(
WNDPROC
)
SetWindowLong
Ptr
(
hwnd
,
GWLP
_WNDPROC
,
(
LONG
)
WndProc3
);
SendMessage
(
hwnd
,
WM_USER
,
1
,
0
);
SendMessage
(
hwnd
,
WM_USER
,
2
,
0
);
ok_sequence
(
Sub_OldAfterNewTest
,
"Old after New"
);
...
...
dlls/gdi/tests/bitmap.c
View file @
e4b2a0bb
...
...
@@ -451,7 +451,7 @@ START_TEST(bitmap)
10
,
10
,
300
,
300
,
NULL
,
NULL
,
NULL
,
NULL
);
assert
(
hWnd
);
is_win9x
=
GetWindowLong
W
(
hWnd
,
GWL
_WNDPROC
)
==
0
;
is_win9x
=
GetWindowLong
PtrW
(
hWnd
,
GWLP
_WNDPROC
)
==
0
;
DestroyWindow
(
hWnd
);
test_createdibitmap
();
...
...
dlls/user/tests/class.c
View file @
e4b2a0bb
...
...
@@ -251,9 +251,9 @@ static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_ins
ok
(
(
HINSTANCE
)
GetClassLongA
(
hwnd
,
GCL_HMODULE
)
==
gcl_inst
,
"Wrong GCL instance %p/%p for class %s
\n
"
,
(
HINSTANCE
)
GetClassLongA
(
hwnd
,
GCL_HMODULE
),
gcl_inst
,
name
);
ok
(
(
HINSTANCE
)
GetWindowLong
A
(
hwnd
,
GWL
_HINSTANCE
)
==
inst
,
ok
(
(
HINSTANCE
)
GetWindowLong
PtrA
(
hwnd
,
GWLP
_HINSTANCE
)
==
inst
,
"Wrong GWL instance %p/%p for window %s
\n
"
,
(
HINSTANCE
)
GetWindowLong
A
(
hwnd
,
GWL
_HINSTANCE
),
inst
,
name
);
(
HINSTANCE
)
GetWindowLong
PtrA
(
hwnd
,
GWLP
_HINSTANCE
),
inst
,
name
);
ok
(
!
UnregisterClassA
(
name
,
inst
),
"UnregisterClassA should fail while exists a class window
\n
"
);
ok
(
GetLastError
()
==
ERROR_CLASS_HAS_WINDOWS
,
"GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %ld
\n
"
,
GetLastError
());
DestroyWindow
(
hwnd
);
...
...
dlls/user/tests/menu.c
View file @
e4b2a0bb
...
...
@@ -172,7 +172,7 @@ static void test_menu_ownerdraw(void)
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"CreateWindowEx failed with error %ld
\n
"
,
GetLastError
());
if
(
!
hwnd
)
return
;
SetWindowLong
(
hwnd
,
GWL
_WNDPROC
,
(
LONG
)
menu_ownerdraw_wnd_proc
);
SetWindowLong
Ptr
(
hwnd
,
GWLP
_WNDPROC
,
(
LONG
)
menu_ownerdraw_wnd_proc
);
hmenu
=
CreatePopupMenu
();
ok
(
hmenu
!=
NULL
,
"CreateMenu failed with error %ld
\n
"
,
GetLastError
());
if
(
!
hmenu
)
{
DestroyWindow
(
hwnd
);
return
;}
...
...
dlls/user/tests/msg.c
View file @
e4b2a0bb
...
...
@@ -4468,7 +4468,7 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
{
DWORD
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
if
(
style
&
WS_CHILD
)
lParam
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
lParam
=
GetWindowLong
PtrA
(
hwnd
,
GWLP
_ID
);
else
if
(
style
&
WS_POPUP
)
lParam
=
WND_POPUP_ID
;
else
...
...
@@ -4497,7 +4497,7 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
{
DWORD
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
if
(
style
&
WS_CHILD
)
lParam
=
GetWindowLong
A
(
hwnd
,
GWL
_ID
);
lParam
=
GetWindowLong
PtrA
(
hwnd
,
GWLP
_ID
);
else
if
(
style
&
WS_POPUP
)
lParam
=
WND_POPUP_ID
;
else
...
...
@@ -4788,7 +4788,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
{
DWORD
style
=
GetWindowLongA
((
HWND
)
wParam
,
GWL_STYLE
);
if
(
style
&
WS_CHILD
)
lParam
=
GetWindowLong
A
((
HWND
)
wParam
,
GWL
_ID
);
lParam
=
GetWindowLong
PtrA
((
HWND
)
wParam
,
GWLP
_ID
);
else
if
(
style
&
WS_POPUP
)
lParam
=
WND_POPUP_ID
;
else
...
...
@@ -5743,7 +5743,7 @@ static void test_DispatchMessage(void)
UpdateWindow
(
hwnd
);
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
flush_sequence
();
SetWindowLongPtrA
(
hwnd
,
GWL_WNDPROC
,
(
LONG_PTR
)
DispatchMessageCheckProc
);
SetWindowLongPtrA
(
hwnd
,
GWL
P
_WNDPROC
,
(
LONG_PTR
)
DispatchMessageCheckProc
);
SetRect
(
&
rect
,
-
5
,
-
5
,
5
,
5
);
RedrawWindow
(
hwnd
,
&
rect
,
0
,
RDW_INVALIDATE
|
RDW_ERASE
|
RDW_FRAME
);
...
...
dlls/user/tests/win.c
View file @
e4b2a0bb
This diff is collapsed.
Click to expand it.
programs/taskmgr/graph.c
View file @
e4b2a0bb
...
...
@@ -115,7 +115,7 @@ LRESULT CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
hdc
=
BeginPaint
(
hWnd
,
&
ps
);
WindowId
=
GetWindowLong
(
hWnd
,
GWL
_ID
);
WindowId
=
GetWindowLong
Ptr
(
hWnd
,
GWLP
_ID
);
switch
(
WindowId
)
{
...
...
programs/taskmgr/perfpage.c
View file @
e4b2a0bb
...
...
@@ -196,10 +196,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam,
/*
* Subclass graph buttons
*/
OldGraphWndProc
=
SetWindowLong
(
hPerformancePageCpuUsageGraph
,
GWL_WNDPROC
,
(
LONG
)
Graph_WndProc
);
SetWindowLong
(
hPerformancePageMemUsageGraph
,
GWL_WNDPROC
,
(
LONG
)
Graph_WndProc
);
OldGraphCtrlWndProc
=
SetWindowLong
(
hPerformancePageMemUsageHistoryGraph
,
GWL_WNDPROC
,
(
LONG
)
GraphCtrl_WndProc
);
SetWindowLong
(
hPerformancePageCpuUsageHistoryGraph
,
GWL_WNDPROC
,
(
LONG
)
GraphCtrl_WndProc
);
OldGraphWndProc
=
SetWindowLong
Ptr
(
hPerformancePageCpuUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
SetWindowLong
Ptr
(
hPerformancePageMemUsageGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
Graph_WndProc
);
OldGraphCtrlWndProc
=
SetWindowLong
Ptr
(
hPerformancePageMemUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
SetWindowLong
Ptr
(
hPerformancePageCpuUsageHistoryGraph
,
GWLP_WNDPROC
,
(
LONG_PTR
)
GraphCtrl_WndProc
);
return
TRUE
;
case
WM_COMMAND
:
...
...
programs/taskmgr/procpage.c
View file @
e4b2a0bb
...
...
@@ -91,7 +91,7 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
/*
* Subclass the process list control so we can intercept WM_ERASEBKGND
*/
OldProcessListWndProc
=
SetWindowLong
(
hProcessPageListCtrl
,
GWL_WNDPROC
,
(
LONG
)
ProcessListWndProc
);
OldProcessListWndProc
=
SetWindowLong
Ptr
(
hProcessPageListCtrl
,
GWLP_WNDPROC
,
(
LONG_PTR
)
ProcessListWndProc
);
/* Start our refresh thread */
CreateThread
(
NULL
,
0
,
ProcessPageRefreshThread
,
NULL
,
0
,
NULL
);
...
...
programs/wineconsole/dialog.c
View file @
e4b2a0bb
...
...
@@ -65,7 +65,7 @@ static BOOL WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
case
WM_INITDIALOG
:
di
=
(
struct
dialog_info
*
)((
PROPSHEETPAGEA
*
)
lParam
)
->
lParam
;
di
->
hDlg
=
hDlg
;
SetWindowLong
(
hDlg
,
DWL_USER
,
(
DWORD
)
di
);
SetWindowLong
Ptr
(
hDlg
,
DWLP_USER
,
(
LONG_PTR
)
di
);
if
(
di
->
config
.
cursor_size
<=
25
)
idc
=
IDC_OPT_CURSOR_SMALL
;
else
if
(
di
->
config
.
cursor_size
<=
50
)
idc
=
IDC_OPT_CURSOR_MEDIUM
;
...
...
@@ -89,7 +89,7 @@ static BOOL WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
DWORD
val
;
BOOL
done
;
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
hDlg
,
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
hDlg
,
DWLP
_USER
);
switch
(
nmhdr
->
code
)
{
...
...
@@ -176,7 +176,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
struct
dialog_info
*
di
;
HFONT
hFont
,
hOldFont
;
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
GetParent
(
hWnd
),
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
GetParent
(
hWnd
),
DWLP
_USER
);
BeginPaint
(
hWnd
,
&
ps
);
font_idx
=
SendDlgItemMessage
(
di
->
hDlg
,
IDC_FNT_LIST_FONT
,
LB_GETCURSEL
,
0L
,
0L
);
...
...
@@ -520,7 +520,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
case
WM_INITDIALOG
:
di
=
(
struct
dialog_info
*
)((
PROPSHEETPAGEA
*
)
lParam
)
->
lParam
;
di
->
hDlg
=
hDlg
;
SetWindowLong
(
hDlg
,
DWL_USER
,
(
DWORD
)
di
);
SetWindowLong
Ptr
(
hDlg
,
DWLP_USER
,
(
DWORD_PTR
)
di
);
/* remove dialog from this control, font will be reset when listboxes are filled */
SendDlgItemMessage
(
hDlg
,
IDC_FNT_PREVIEW
,
WM_SETFONT
,
0L
,
0L
);
fill_list_font
(
di
);
...
...
@@ -528,7 +528,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
SetWindowLong
(
GetDlgItem
(
hDlg
,
IDC_FNT_COLOR_FG
),
0
,
di
->
config
.
def_attr
&
0x0F
);
break
;
case
WM_COMMAND
:
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
hDlg
,
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
hDlg
,
DWLP
_USER
);
switch
(
LOWORD
(
wParam
))
{
case
IDC_FNT_LIST_FONT
:
...
...
@@ -550,7 +550,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
NMHDR
*
nmhdr
=
(
NMHDR
*
)
lParam
;
DWORD
val
;
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
hDlg
,
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
hDlg
,
DWLP
_USER
);
switch
(
nmhdr
->
code
)
{
case
PSN_SETACTIVE
:
...
...
@@ -600,7 +600,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
case
WM_INITDIALOG
:
di
=
(
struct
dialog_info
*
)((
PROPSHEETPAGEA
*
)
lParam
)
->
lParam
;
di
->
hDlg
=
hDlg
;
SetWindowLong
(
hDlg
,
DWL_USER
,
(
DWORD
)
di
);
SetWindowLong
Ptr
(
hDlg
,
DWLP_USER
,
(
DWORD_PTR
)
di
);
SetDlgItemInt
(
hDlg
,
IDC_CNF_SB_WIDTH
,
di
->
config
.
sb_width
,
FALSE
);
SetDlgItemInt
(
hDlg
,
IDC_CNF_SB_HEIGHT
,
di
->
config
.
sb_height
,
FALSE
);
SetDlgItemInt
(
hDlg
,
IDC_CNF_WIN_WIDTH
,
di
->
config
.
win_width
,
FALSE
);
...
...
@@ -621,7 +621,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
break
;
case
WM_COMMAND
:
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
hDlg
,
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
hDlg
,
DWLP
_USER
);
switch
(
LOWORD
(
wParam
))
{
}
...
...
@@ -632,7 +632,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
int
win_w
,
win_h
,
sb_w
,
sb_h
;
BOOL
st1
,
st2
;
di
=
(
struct
dialog_info
*
)
GetWindowLong
(
hDlg
,
DWL
_USER
);
di
=
(
struct
dialog_info
*
)
GetWindowLong
Ptr
(
hDlg
,
DWLP
_USER
);
switch
(
nmhdr
->
code
)
{
case
PSN_SETACTIVE
:
...
...
programs/winedbg/gdbproxy.c
View file @
e4b2a0bb
...
...
@@ -1417,7 +1417,7 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
"%*s%04x%*s%-17.17s %08lx %08lx %.14s
\n
"
,
indent
,
""
,
(
UINT
)
hWnd
,
13
-
indent
,
""
,
clsName
,
GetWindowLong
(
hWnd
,
GWL_STYLE
),
GetWindowLong
(
hWnd
,
GWL
_WNDPROC
),
wndName
);
GetWindowLong
Ptr
(
hWnd
,
GWLP
_WNDPROC
),
wndName
);
packet_reply_hex_to_str
(
gdbctx
,
buffer
);
packet_reply_close
(
gdbctx
);
...
...
programs/winedbg/info.c
View file @
e4b2a0bb
...
...
@@ -305,7 +305,7 @@ static void class_walker(HWND hWnd, struct class_walker* cw)
void
info_win32_class
(
HWND
hWnd
,
const
char
*
name
)
{
WNDCLASSEXA
wca
;
HINSTANCE
hInst
=
hWnd
?
(
HINSTANCE
)
GetWindowLong
(
hWnd
,
GWL
_HINSTANCE
)
:
0
;
HINSTANCE
hInst
=
hWnd
?
(
HINSTANCE
)
GetWindowLong
Ptr
(
hWnd
,
GWLP
_HINSTANCE
)
:
0
;
if
(
!
name
)
{
...
...
@@ -369,7 +369,7 @@ static void info_window(HWND hWnd, int indent)
dbg_printf
(
"%*s%08x%*s %-17.17s %08lx %08lx %08lx %.14s
\n
"
,
indent
,
""
,
(
UINT
)
hWnd
,
12
-
indent
,
""
,
clsName
,
GetWindowLong
(
hWnd
,
GWL_STYLE
),
GetWindowLong
(
hWnd
,
GWL
_WNDPROC
),
GetWindowLong
Ptr
(
hWnd
,
GWLP
_WNDPROC
),
GetWindowThreadProcessId
(
hWnd
,
NULL
),
wndName
);
if
((
child
=
GetWindow
(
hWnd
,
GW_CHILD
))
!=
0
)
...
...
@@ -416,12 +416,12 @@ void info_win32_window(HWND hWnd, BOOL detailed)
GetParent
(
hWnd
),
GetWindow
(
hWnd
,
GW_OWNER
),
clsName
,
(
HINSTANCE
)
GetWindowLong
(
hWnd
,
GWL
_HINSTANCE
),
(
HINSTANCE
)
GetWindowLong
Ptr
(
hWnd
,
GWLP
_HINSTANCE
),
GetLastActivePopup
(
hWnd
),
GetWindowLong
(
hWnd
,
GWL
_ID
),
GetWindowLong
Ptr
(
hWnd
,
GWLP
_ID
),
GetWindowLong
(
hWnd
,
GWL_STYLE
),
GetWindowLong
(
hWnd
,
GWL_EXSTYLE
),
GetWindowLong
(
hWnd
,
GWL
_WNDPROC
),
GetWindowLong
Ptr
(
hWnd
,
GWLP
_WNDPROC
),
wndName
,
clientRect
.
left
,
clientRect
.
top
,
clientRect
.
right
,
clientRect
.
bottom
,
windowRect
.
left
,
windowRect
.
top
,
windowRect
.
right
,
windowRect
.
bottom
,
...
...
programs/winefile/winefile.c
View file @
e4b2a0bb
...
...
@@ -1616,7 +1616,7 @@ static LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
newchild
=
NULL
;
child
->
hwnd
=
(
HWND
)
wparam
;
SetWindowLong
(
child
->
hwnd
,
GWL
_USERDATA
,
(
LPARAM
)
child
);
SetWindowLong
Ptr
(
child
->
hwnd
,
GWLP
_USERDATA
,
(
LPARAM
)
child
);
}
return
CallNextHookEx
(
hcbthook
,
code
,
wparam
,
lparam
);
...
...
@@ -1696,7 +1696,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
switch
(
nmsg
)
{
case
WM_INITDIALOG
:
SetWindowLong
(
hwnd
,
GWL
_USERDATA
,
lparam
);
SetWindowLong
Ptr
(
hwnd
,
GWLP
_USERDATA
,
lparam
);
SetWindowText
(
GetDlgItem
(
hwnd
,
201
),
(
LPCTSTR
)
lparam
);
return
1
;
...
...
@@ -1705,7 +1705,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
switch
(
id
)
{
case
IDOK
:
{
LPTSTR
dest
=
(
LPTSTR
)
GetWindowLong
(
hwnd
,
GWL
_USERDATA
);
LPTSTR
dest
=
(
LPTSTR
)
GetWindowLong
Ptr
(
hwnd
,
GWLP
_USERDATA
);
GetWindowText
(
GetDlgItem
(
hwnd
,
201
),
dest
,
MAX_PATH
);
EndDialog
(
hwnd
,
id
);
break
;}
...
...
@@ -2083,7 +2083,7 @@ static BOOL activate_drive_window(LPCTSTR path)
/* search for a already open window for the same drive */
for
(
child_wnd
=
GetNextWindow
(
Globals
.
hmdiclient
,
GW_CHILD
);
child_wnd
;
child_wnd
=
GetNextWindow
(
child_wnd
,
GW_HWNDNEXT
))
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
(
child_wnd
,
GWL
_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
Ptr
(
child_wnd
,
GWLP
_USERDATA
);
if
(
child
)
{
_tsplitpath
(
child
->
root
.
path
,
drv2
,
0
,
0
,
0
);
...
...
@@ -2108,7 +2108,7 @@ static BOOL activate_fs_window(LPCTSTR filesys)
/* search for a already open window of the given file system name */
for
(
child_wnd
=
GetNextWindow
(
Globals
.
hmdiclient
,
GW_CHILD
);
child_wnd
;
child_wnd
=
GetNextWindow
(
child_wnd
,
GW_HWNDNEXT
))
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
(
child_wnd
,
GWL
_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
Ptr
(
child_wnd
,
GWLP
_USERDATA
);
if
(
child
)
{
if
(
!
lstrcmpi
(
child
->
root
.
fs
,
filesys
))
{
...
...
@@ -2253,7 +2253,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
/* change font in all open child windows */
for
(
childWnd
=
GetWindow
(
Globals
.
hmdiclient
,
GW_CHILD
);
childWnd
;
childWnd
=
GetNextWindow
(
childWnd
,
GW_HWNDNEXT
))
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
(
childWnd
,
GWL
_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
Ptr
(
childWnd
,
GWLP
_USERDATA
);
SetWindowFont
(
child
->
left
.
hwnd
,
Globals
.
hfont
,
TRUE
);
SetWindowFont
(
child
->
right
.
hwnd
,
Globals
.
hfont
,
TRUE
);
ListBox_SetItemHeight
(
child
->
left
.
hwnd
,
1
,
max
(
Globals
.
spaceSize
.
cy
,
IMAGE_HEIGHT
+
3
));
...
...
@@ -2860,7 +2860,7 @@ static void create_tree_window(HWND parent, Pane* pane, int id, int id_header, L
LBS_DISABLENOSCROLL
|
LBS_NOINTEGRALHEIGHT
|
LBS_OWNERDRAWFIXED
|
LBS_NOTIFY
,
0
,
0
,
0
,
0
,
parent
,
(
HMENU
)
id
,
Globals
.
hInstance
,
0
);
SetWindowLong
(
pane
->
hwnd
,
GWL
_USERDATA
,
(
LPARAM
)
pane
);
SetWindowLong
Ptr
(
pane
->
hwnd
,
GWLP
_USERDATA
,
(
LPARAM
)
pane
);
g_orgTreeWndProc
=
SubclassWindow
(
pane
->
hwnd
,
TreeWndProc
);
SetWindowFont
(
pane
->
hwnd
,
Globals
.
hfont
,
FALSE
);
...
...
@@ -4142,7 +4142,7 @@ static HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParen
static
LRESULT
CALLBACK
ChildWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
(
hwnd
,
GWL
_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
Ptr
(
hwnd
,
GWLP
_USERDATA
);
ASSERT
(
child
);
switch
(
nmsg
)
{
...
...
@@ -4165,7 +4165,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
case
WM_NCDESTROY
:
free_child_window
(
child
);
SetWindowLong
(
hwnd
,
GWL
_USERDATA
,
0
);
SetWindowLong
Ptr
(
hwnd
,
GWLP
_USERDATA
,
0
);
break
;
case
WM_PAINT
:
{
...
...
@@ -4524,8 +4524,8 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
static
LRESULT
CALLBACK
TreeWndProc
(
HWND
hwnd
,
UINT
nmsg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
(
GetParent
(
hwnd
),
GWL
_USERDATA
);
Pane
*
pane
=
(
Pane
*
)
GetWindowLong
(
hwnd
,
GWL
_USERDATA
);
ChildWnd
*
child
=
(
ChildWnd
*
)
GetWindowLong
Ptr
(
GetParent
(
hwnd
),
GWLP
_USERDATA
);
Pane
*
pane
=
(
Pane
*
)
GetWindowLong
Ptr
(
hwnd
,
GWLP
_USERDATA
);
ASSERT
(
child
);
switch
(
nmsg
)
{
...
...
programs/winhelp/winhelp.c
View file @
e4b2a0bb
...
...
@@ -763,8 +763,8 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa
Globals
.
hInstance
,
0
);
if
(
button
->
hWnd
)
{
if
(
Globals
.
button_proc
==
NULL
)
Globals
.
button_proc
=
(
WNDPROC
)
GetWindowLong
(
button
->
hWnd
,
GWL
_WNDPROC
);
SetWindowLong
(
button
->
hWnd
,
GWL_WNDPROC
,
(
LONG
)
WINHELP_ButtonWndProc
);
Globals
.
button_proc
=
(
WNDPROC
)
GetWindowLong
Ptr
(
button
->
hWnd
,
GWLP
_WNDPROC
);
SetWindowLong
Ptr
(
button
->
hWnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
WINHELP_ButtonWndProc
);
}
}
hDc
=
GetDC
(
button
->
hWnd
);
...
...
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