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
1b89fe49
Commit
1b89fe49
authored
Jan 27, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Jan 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Don't automatically add a bunch of styles in create_editcontrol.
parent
ec23fb3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
edit.c
dlls/user/tests/edit.c
+19
-19
No files found.
dlls/user/tests/edit.c
View file @
1b89fe49
...
...
@@ -51,7 +51,7 @@ static HWND create_editcontrol (DWORD style, DWORD exstyle)
handle
=
CreateWindowEx
(
exstyle
,
"EDIT"
,
"Test Text"
,
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
|
style
,
style
,
10
,
10
,
300
,
300
,
NULL
,
NULL
,
hinst
,
NULL
);
assert
(
handle
);
...
...
@@ -84,7 +84,7 @@ static HWND create_child_editcontrol (DWORD style, DWORD exstyle)
editWnd
=
CreateWindowEx
(
exstyle
,
"EDIT"
,
"Test Text"
,
WS_CHILD
|
WS_VISIBLE
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
|
style
,
WS_CHILD
|
style
,
0
,
0
,
300
,
300
,
parentWnd
,
NULL
,
hinst
,
NULL
);
assert
(
editWnd
);
...
...
@@ -166,7 +166,7 @@ static void test_edit_control_1(void)
msMessage
.
message
=
WM_KEYDOWN
;
trace
(
"EDIT: Single line
\n
"
);
hwEdit
=
create_editcontrol
(
0
,
0
);
hwEdit
=
create_editcontrol
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
r
==
(
ES_AUTOVSCROLL
|
ES_AUTOHSCROLL
),
"Wrong style expected 0xc0 got: 0x%lx
\n
"
,
r
);
for
(
i
=
0
;
i
<
65535
;
i
++
)
...
...
@@ -179,7 +179,7 @@ static void test_edit_control_1(void)
DestroyWindow
(
hwEdit
);
trace
(
"EDIT: Single line want returns
\n
"
);
hwEdit
=
create_editcontrol
(
ES_WANTRETURN
,
0
);
hwEdit
=
create_editcontrol
(
ES_WANTRETURN
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
r
==
(
ES_AUTOVSCROLL
|
ES_AUTOHSCROLL
|
ES_WANTRETURN
),
"Wrong style expected 0x10c0 got: 0x%lx
\n
"
,
r
);
for
(
i
=
0
;
i
<
65535
;
i
++
)
...
...
@@ -192,7 +192,7 @@ static void test_edit_control_1(void)
DestroyWindow
(
hwEdit
);
trace
(
"EDIT: Multiline line
\n
"
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
WS_VSCROLL
|
ES_AUTOVSCROLL
,
0
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
WS_VSCROLL
|
ES_AUTO
HSCROLL
|
ES_AUTO
VSCROLL
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
r
==
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
|
ES_MULTILINE
),
"Wrong style expected 0xc4 got: 0x%lx
\n
"
,
r
);
for
(
i
=
0
;
i
<
65535
;
i
++
)
...
...
@@ -205,7 +205,7 @@ static void test_edit_control_1(void)
DestroyWindow
(
hwEdit
);
trace
(
"EDIT: Multi line want returns
\n
"
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
WS_VSCROLL
|
ES_
AUTOVSCROLL
|
ES_WANTRETURN
,
0
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
WS_VSCROLL
|
ES_
WANTRETURN
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
r
=
get_edit_style
(
hwEdit
);
ok
(
r
==
(
ES_WANTRETURN
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
|
ES_MULTILINE
),
"Wrong style expected 0x10c4 got: 0x%lx
\n
"
,
r
);
for
(
i
=
0
;
i
<
65535
;
i
++
)
...
...
@@ -562,7 +562,7 @@ static void test_edit_control_4(void)
int
i
;
trace
(
"EDIT: Test EM_CHARFROMPOS and EM_POSFROMCHAR
\n
"
);
hwEdit
=
create_editcontrol
(
0
,
0
);
hwEdit
=
create_editcontrol
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -580,7 +580,7 @@ static void test_edit_control_4(void)
ok
(
-
1
==
ret
,
"expected -1 got %d
\n
"
,
ret
);
DestroyWindow
(
hwEdit
);
hwEdit
=
create_editcontrol
(
ES_RIGHT
,
0
);
hwEdit
=
create_editcontrol
(
ES_RIGHT
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -598,7 +598,7 @@ static void test_edit_control_4(void)
ok
(
-
1
==
ret
,
"expected -1 got %d
\n
"
,
ret
);
DestroyWindow
(
hwEdit
);
hwEdit
=
create_editcontrol
(
ES_CENTER
,
0
);
hwEdit
=
create_editcontrol
(
ES_CENTER
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -616,7 +616,7 @@ static void test_edit_control_4(void)
ok
(
-
1
==
ret
,
"expected -1 got %d
\n
"
,
ret
);
DestroyWindow
(
hwEdit
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
,
0
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -634,7 +634,7 @@ static void test_edit_control_4(void)
ok
(
-
1
==
ret
,
"expected -1 got %d
\n
"
,
ret
);
DestroyWindow
(
hwEdit
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
ES_RIGHT
,
0
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
ES_RIGHT
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -652,7 +652,7 @@ static void test_edit_control_4(void)
ok
(
-
1
==
ret
,
"expected -1 got %d
\n
"
,
ret
);
DestroyWindow
(
hwEdit
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
ES_CENTER
,
0
);
hwEdit
=
create_editcontrol
(
ES_MULTILINE
|
ES_CENTER
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
SendMessage
(
hwEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"aa"
);
lo
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
0
,
0
));
hi
=
LOWORD
(
SendMessage
(
hwEdit
,
EM_POSFROMCHAR
,
1
,
0
));
...
...
@@ -712,7 +712,7 @@ static void test_margins(void)
INT
old_left_margin
,
old_right_margin
;
DWORD
old_margins
,
new_margins
;
hwEdit
=
create_editcontrol
(
WS_BORDER
,
0
);
hwEdit
=
create_editcontrol
(
WS_BORDER
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
old_margins
=
SendMessage
(
hwEdit
,
EM_GETMARGINS
,
0
,
0
);
old_left_margin
=
LOWORD
(
old_margins
);
...
...
@@ -810,7 +810,7 @@ void test_text_position_style(DWORD style)
/* Edit controls that are in a parent window */
hwEdit
=
create_child_editcontrol
(
style
,
0
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_VISIBLE
,
0
);
SendMessage
(
hwEdit
,
WM_SETFONT
,
(
WPARAM
)
font
,
(
LPARAM
)
FALSE
);
if
(
single_line
)
check_pos
(
hwEdit
,
metrics
.
tmHeight
-
1
,
0
,
metrics
.
tmHeight
-
1
,
0
);
...
...
@@ -820,7 +820,7 @@ void test_text_position_style(DWORD style)
check_pos
(
hwEdit
,
metrics
.
tmHeight
+
10
,
0
,
metrics
.
tmHeight
,
0
);
destroy_child_editcontrol
(
hwEdit
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_BORDER
,
0
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_BORDER
|
WS_VISIBLE
,
0
);
SendMessage
(
hwEdit
,
WM_SETFONT
,
(
WPARAM
)
font
,
(
LPARAM
)
FALSE
);
if
(
single_line
)
check_pos
(
hwEdit
,
metrics
.
tmHeight
-
1
,
0
,
metrics
.
tmHeight
-
1
,
b
);
...
...
@@ -831,7 +831,7 @@ void test_text_position_style(DWORD style)
check_pos
(
hwEdit
,
metrics
.
tmHeight
+
b3
,
b
,
metrics
.
tmHeight
,
b
);
destroy_child_editcontrol
(
hwEdit
);
hwEdit
=
create_child_editcontrol
(
style
,
WS_EX_CLIENTEDGE
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_VISIBLE
,
WS_EX_CLIENTEDGE
);
SendMessage
(
hwEdit
,
WM_SETFONT
,
(
WPARAM
)
font
,
(
LPARAM
)
FALSE
);
if
(
single_line
)
check_pos
(
hwEdit
,
metrics
.
tmHeight
-
1
,
0
,
metrics
.
tmHeight
-
1
,
1
);
...
...
@@ -841,7 +841,7 @@ void test_text_position_style(DWORD style)
check_pos
(
hwEdit
,
metrics
.
tmHeight
+
10
,
1
,
metrics
.
tmHeight
,
1
);
destroy_child_editcontrol
(
hwEdit
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_BORDER
,
WS_EX_CLIENTEDGE
);
hwEdit
=
create_child_editcontrol
(
style
|
WS_BORDER
|
WS_VISIBLE
,
WS_EX_CLIENTEDGE
);
SendMessage
(
hwEdit
,
WM_SETFONT
,
(
WPARAM
)
font
,
(
LPARAM
)
FALSE
);
if
(
single_line
)
check_pos
(
hwEdit
,
metrics
.
tmHeight
-
1
,
0
,
metrics
.
tmHeight
-
1
,
1
);
...
...
@@ -899,9 +899,9 @@ void test_text_position_style(DWORD style)
void
test_text_position
(
void
)
{
trace
(
"EDIT: Text position (Single line)
\n
"
);
test_text_position_style
(
0
);
test_text_position_style
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
);
trace
(
"EDIT: Text position (Multi line)
\n
"
);
test_text_position_style
(
ES_MULTILINE
);
test_text_position_style
(
ES_MULTILINE
|
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
);
}
static
BOOL
RegisterWindowClasses
(
void
)
...
...
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