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
4ee81394
Commit
4ee81394
authored
Apr 18, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use SetRect instead of open coding it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
414c73fe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
18 deletions
+7
-18
edit.c
dlls/user32/tests/edit.c
+2
-9
sysparams.c
dlls/user32/tests/sysparams.c
+1
-4
uitools.c
dlls/user32/tests/uitools.c
+1
-2
win.c
dlls/user32/tests/win.c
+3
-3
No files found.
dlls/user32/tests/edit.c
View file @
4ee81394
...
...
@@ -574,11 +574,7 @@ static HWND create_child_editcontrol (DWORD style, DWORD exstyle)
HWND
editWnd
;
RECT
rect
;
BOOL
b
;
rect
.
left
=
0
;
rect
.
top
=
0
;
rect
.
right
=
300
;
rect
.
bottom
=
300
;
SetRect
(
&
rect
,
0
,
0
,
300
,
300
);
b
=
AdjustWindowRect
(
&
rect
,
WS_OVERLAPPEDWINDOW
,
FALSE
);
ok
(
b
,
"AdjustWindowRect failed
\n
"
);
...
...
@@ -1468,10 +1464,7 @@ static void test_margins(void)
the rectangle must not change */
SendMessageA
(
hwEdit
,
EM_SETMARGINS
,
EC_LEFTMARGIN
|
EC_RIGHTMARGIN
,
MAKELONG
(
10
,
10
));
old_rect
.
left
=
1
;
old_rect
.
right
=
99
;
old_rect
.
top
=
1
;
old_rect
.
bottom
=
99
;
SetRect
(
&
old_rect
,
1
,
1
,
99
,
99
);
SendMessageA
(
hwEdit
,
EM_SETRECT
,
0
,
(
LPARAM
)
&
old_rect
);
SendMessageA
(
hwEdit
,
EM_GETRECT
,
0
,
(
LPARAM
)
&
old_rect
);
SendMessageA
(
hwEdit
,
EM_SETMARGINS
,
EC_LEFTMARGIN
|
EC_RIGHTMARGIN
,
MAKELONG
(
10
,
10
));
...
...
dlls/user32/tests/sysparams.c
View file @
4ee81394
...
...
@@ -1835,10 +1835,7 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
* Changing the work area by just one pixel should make this occurrence
* reasonably unlikely.
*/
curr_val
.
left
=
old_area
.
left
;
curr_val
.
top
=
old_area
.
top
;
curr_val
.
right
=
old_area
.
right
-
1
;
curr_val
.
bottom
=
old_area
.
bottom
-
1
;
SetRect
(
&
curr_val
,
old_area
.
left
,
old_area
.
top
,
old_area
.
right
-
1
,
old_area
.
bottom
-
1
);
rc
=
SystemParametersInfoA
(
SPI_SETWORKAREA
,
0
,
&
curr_val
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETWORKAREA"
))
return
;
...
...
dlls/user32/tests/uitools.c
View file @
4ee81394
...
...
@@ -49,8 +49,7 @@ static void test_FillRect(void)
/* select black brush */
old_brush
=
SelectObject
(
hdcmem
,
GetStockObject
(
BLACK_BRUSH
));
r
.
left
=
r
.
top
=
0
;
r
.
right
=
r
.
bottom
=
5
;
SetRect
(
&
r
,
0
,
0
,
5
,
5
);
FillRect
(
hdcmem
,
&
r
,
0
);
SelectObject
(
hdcmem
,
old_brush
);
/* bitmap filled with last selected brush */
...
...
dlls/user32/tests/win.c
View file @
4ee81394
...
...
@@ -7578,7 +7578,7 @@ static void test_winregion(void)
ok
(
ret
==
ERROR
,
"Expected ERROR, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected , got %d
\n
"
,
GetLastError
());
r
.
left
=
r
.
top
=
r
.
right
=
r
.
bottom
=
0
;
SetRectEmpty
(
&
r
)
;
ret
=
pGetWindowRgnBox
(
hwnd
,
&
r
);
ok
(
ret
==
SIMPLEREGION
,
"Expected SIMPLEREGION, got %d
\n
"
,
ret
);
ok
(
r
.
left
==
2
&&
r
.
top
==
3
&&
r
.
right
==
10
&&
r
.
bottom
==
15
,
...
...
@@ -7589,10 +7589,10 @@ static void test_winregion(void)
hrgn
=
CreateRectRgn
(
2
,
3
,
10
,
15
);
ret
=
pMirrorRgn
(
hwnd
,
hrgn
);
ok
(
ret
==
TRUE
,
"MirrorRgn failed %u
\n
"
,
ret
);
r
.
left
=
r
.
top
=
r
.
right
=
r
.
bottom
=
0
;
SetRectEmpty
(
&
r
)
;
GetWindowRect
(
hwnd
,
&
r
);
width
=
r
.
right
-
r
.
left
;
r
.
left
=
r
.
top
=
r
.
right
=
r
.
bottom
=
0
;
SetRectEmpty
(
&
r
)
;
ret
=
GetRgnBox
(
hrgn
,
&
r
);
ok
(
ret
==
SIMPLEREGION
,
"GetRgnBox failed %u
\n
"
,
ret
);
ok
(
r
.
left
==
width
-
10
&&
r
.
top
==
3
&&
r
.
right
==
width
-
2
&&
r
.
bottom
==
15
,
...
...
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