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
11f05970
Commit
11f05970
authored
Mar 14, 2019
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add Unicode version tests for Edit control margins.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c29f5803
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
edit.c
dlls/user32/tests/edit.c
+28
-2
No files found.
dlls/user32/tests/edit.c
View file @
11f05970
...
...
@@ -1561,6 +1561,7 @@ static void test_margins_default(UINT charset)
RECT
rect
;
INT
margins
,
expect
;
const
UINT
small_margins
=
MAKELONG
(
1
,
5
);
const
WCHAR
EditW
[]
=
{
'E'
,
'd'
,
'i'
,
't'
,
0
},
strW
[]
=
{
'W'
,
0
};
memset
(
&
lf
,
0
,
sizeof
(
lf
));
lf
.
lfHeight
=
-
11
;
...
...
@@ -1571,8 +1572,8 @@ static void test_margins_default(UINT charset)
hfont
=
CreateFontIndirectA
(
&
lf
);
ok
(
hfont
!=
NULL
,
"got %p
\n
"
,
hfont
);
/*
Big window rectangle
*/
hwnd
=
CreateWindowEx
A
(
0
,
"Edit"
,
"A"
,
WS_POPUP
,
0
,
0
,
5000
,
1000
,
NULL
,
NULL
,
NULL
,
NULL
);
/*
Unicode version
*/
hwnd
=
CreateWindowEx
W
(
0
,
EditW
,
strW
,
WS_POPUP
,
0
,
0
,
5000
,
1000
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"got %p
\n
"
,
hwnd
);
GetClientRect
(
hwnd
,
&
rect
);
ok
(
!
IsRectEmpty
(
&
rect
),
"got rect %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
...
...
@@ -1614,6 +1615,31 @@ static void test_margins_default(UINT charset)
}
DestroyWindow
(
hwnd
);
/* ANSI version */
hwnd
=
CreateWindowExA
(
0
,
"Edit"
,
"A"
,
WS_POPUP
,
0
,
0
,
5000
,
1000
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"got %p
\n
"
,
hwnd
);
GetClientRect
(
hwnd
,
&
rect
);
ok
(
!
IsRectEmpty
(
&
rect
),
"got rect %s
\n
"
,
wine_dbgstr_rect
(
&
rect
));
margins
=
SendMessageA
(
hwnd
,
EM_GETMARGINS
,
0
,
0
);
ok
(
margins
==
0
,
"got %x
\n
"
,
margins
);
SendMessageA
(
hwnd
,
EM_SETMARGINS
,
EC_LEFTMARGIN
|
EC_RIGHTMARGIN
,
small_margins
);
SendMessageA
(
hwnd
,
WM_SETFONT
,
(
WPARAM
)
hfont
,
MAKELPARAM
(
TRUE
,
0
));
margins
=
SendMessageA
(
hwnd
,
EM_GETMARGINS
,
0
,
0
);
if
(
!
cjk_charset
)
ok
(
margins
==
expect
,
"%d: got %d, %d
\n
"
,
charset
,
HIWORD
(
margins
),
LOWORD
(
margins
));
SendMessageA
(
hwnd
,
EM_SETMARGINS
,
EC_LEFTMARGIN
|
EC_RIGHTMARGIN
,
small_margins
);
SendMessageA
(
hwnd
,
EM_SETMARGINS
,
EC_LEFTMARGIN
|
EC_RIGHTMARGIN
,
MAKELONG
(
EC_USEFONTINFO
,
EC_USEFONTINFO
));
margins
=
SendMessageA
(
hwnd
,
EM_GETMARGINS
,
0
,
0
);
if
(
!
cjk_charset
)
ok
(
margins
==
expect
,
"%d: got %d, %d
\n
"
,
charset
,
HIWORD
(
margins
),
LOWORD
(
margins
));
else
{
ok
(
HIWORD
(
margins
)
<=
HIWORD
(
expect
),
"%d: got %d
\n
"
,
charset
,
HIWORD
(
margins
));
ok
(
LOWORD
(
margins
)
<=
LOWORD
(
expect
),
"%d: got %d
\n
"
,
charset
,
LOWORD
(
margins
));
}
DestroyWindow
(
hwnd
);
DeleteObject
(
hfont
);
}
...
...
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