Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d4fd5840
Commit
d4fd5840
authored
Feb 24, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 24, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetWindowRect and GetClientRect do not change RECT contents if the
passed window handle is invalid.
parent
c9e7bad8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
win.c
dlls/user/tests/win.c
+16
-5
No files found.
dlls/user/tests/win.c
View file @
d4fd5840
...
...
@@ -456,7 +456,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
}
case
WM_WINDOWPOSCHANGING
:
{
BOOL
is_win9x
=
GetWindowLong
W
(
hwnd
,
GWL
_WNDPROC
)
==
0
;
BOOL
is_win9x
=
GetWindowLong
PtrW
(
hwnd
,
GWLP
_WNDPROC
)
==
0
;
WINDOWPOS
*
winpos
=
(
WINDOWPOS
*
)
lparam
;
trace
(
"main: WM_WINDOWPOSCHANGING
\n
"
);
trace
(
"%p after %p, x %d, y %d, cx %d, cy %d flags %08x
\n
"
,
...
...
@@ -617,7 +617,8 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info, BOOL test_bord
ok
(
info
->
dwStyle
==
(
DWORD
)
GetWindowLongA
(
hwnd
,
GWL_STYLE
),
"wrong dwStyle
\n
"
);
ok
(
info
->
dwExStyle
==
(
DWORD
)
GetWindowLongA
(
hwnd
,
GWL_EXSTYLE
),
"wrong dwExStyle
\n
"
);
status
=
(
GetActiveWindow
()
==
hwnd
)
?
WS_ACTIVECAPTION
:
0
;
ok
(
info
->
dwWindowStatus
==
status
,
"wrong dwWindowStatus
\n
"
);
ok
(
info
->
dwWindowStatus
==
status
,
"wrong dwWindowStatus %04lx/%04lx
\n
"
,
info
->
dwWindowStatus
,
status
);
if
(
test_borders
&&
!
IsRectEmpty
(
&
rcWindow
))
{
...
...
@@ -707,7 +708,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
/* on HCBT_DESTROYWND window state is undefined */
if
(
nCode
!=
HCBT_DESTROYWND
&&
wParam
)
{
BOOL
is_win9x
=
GetWindowLong
W
((
HWND
)
wParam
,
GWL
_WNDPROC
)
==
0
;
BOOL
is_win9x
=
GetWindowLong
PtrW
((
HWND
)
wParam
,
GWLP
_WNDPROC
)
==
0
;
if
(
is_win9x
&&
nCode
==
HCBT_CREATEWND
)
/* Win9x doesn't like WM_NCCALCSIZE with synthetic data and crashes */
;
else
...
...
@@ -1682,7 +1683,17 @@ static void test_SetWindowPos(HWND hwnd)
{
RECT
orig_win_rc
,
rect
;
LONG_PTR
old_proc
;
BOOL
is_win9x
=
GetWindowLongW
(
hwnd
,
GWL_WNDPROC
)
==
0
;
BOOL
is_win9x
=
GetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
)
==
0
;
SetRect
(
&
rect
,
111
,
222
,
333
,
444
);
ok
(
!
GetWindowRect
(
0
,
&
rect
),
"GetWindowRect succeeded
\n
"
);
ok
(
rect
.
left
==
111
&&
rect
.
top
==
222
&&
rect
.
right
==
333
&&
rect
.
bottom
==
444
,
"wrong window rect %ld,%ld-%ld,%ld
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
SetRect
(
&
rect
,
111
,
222
,
333
,
444
);
ok
(
!
GetClientRect
(
0
,
&
rect
),
"GetClientRect succeeded
\n
"
);
ok
(
rect
.
left
==
111
&&
rect
.
top
==
222
&&
rect
.
right
==
333
&&
rect
.
bottom
==
444
,
"wrong window rect %ld,%ld-%ld,%ld
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
GetWindowRect
(
hwnd
,
&
orig_win_rc
);
...
...
@@ -1727,7 +1738,7 @@ static void test_SetMenu(HWND parent)
{
HWND
child
;
HMENU
hMenu
,
ret
;
BOOL
is_win9x
=
GetWindowLong
W
(
parent
,
GWL
_WNDPROC
)
==
0
;
BOOL
is_win9x
=
GetWindowLong
PtrW
(
parent
,
GWLP
_WNDPROC
)
==
0
;
BOOL
retok
;
hMenu
=
CreateMenu
();
...
...
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