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
86f45494
Commit
86f45494
authored
Dec 19, 2005
by
Lauri Tulmin
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't truncate text when creating edit control.
parent
3df678a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
edit.c
dlls/user/edit.c
+1
-1
edit.c
dlls/user/tests/edit.c
+35
-0
No files found.
dlls/user/edit.c
View file @
86f45494
...
@@ -4061,7 +4061,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name)
...
@@ -4061,7 +4061,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, LPCWSTR name)
EDIT_SetRectNP
(
es
,
&
clientRect
);
EDIT_SetRectNP
(
es
,
&
clientRect
);
if
(
name
&&
*
name
)
{
if
(
name
&&
*
name
)
{
EDIT_EM_ReplaceSel
(
es
,
FALSE
,
name
,
FALSE
,
TRU
E
);
EDIT_EM_ReplaceSel
(
es
,
FALSE
,
name
,
FALSE
,
FALS
E
);
/* if we insert text to the editline, the text scrolls out
/* if we insert text to the editline, the text scrolls out
* of the window, as the caret is placed after the insert
* of the window, as the caret is placed after the insert
* pos normally; thus we reset es->selection... to 0 and
* pos normally; thus we reset es->selection... to 0 and
...
...
dlls/user/tests/edit.c
View file @
86f45494
...
@@ -671,6 +671,40 @@ static void test_edit_control_4(void)
...
@@ -671,6 +671,40 @@ static void test_edit_control_4(void)
DestroyWindow
(
hwEdit
);
DestroyWindow
(
hwEdit
);
}
}
/* Test if creating edit control without ES_AUTOHSCROLL and ES_AUTOVSCROLL
* truncates text that doesn't fit.
*/
static
void
test_edit_control_5
(
void
)
{
static
const
char
*
str
=
"test
\r\n
test"
;
HWND
hWnd
;
int
len
;
hWnd
=
CreateWindowEx
(
0
,
"EDIT"
,
str
,
0
,
10
,
10
,
1
,
1
,
NULL
,
NULL
,
NULL
,
NULL
);
assert
(
hWnd
);
len
=
SendMessageA
(
hWnd
,
WM_GETTEXTLENGTH
,
0
,
0
);
ok
(
lstrlenA
(
str
)
==
len
,
"text shouldn't have been truncated
\n
"
);
DestroyWindow
(
hWnd
);
hWnd
=
CreateWindowEx
(
0
,
"EDIT"
,
str
,
ES_MULTILINE
,
10
,
10
,
1
,
1
,
NULL
,
NULL
,
NULL
,
NULL
);
assert
(
hWnd
);
len
=
SendMessageA
(
hWnd
,
WM_GETTEXTLENGTH
,
0
,
0
);
ok
(
lstrlenA
(
str
)
==
len
,
"text shouldn't have been truncated
\n
"
);
DestroyWindow
(
hWnd
);
}
static
void
test_margins
(
void
)
static
void
test_margins
(
void
)
{
{
HWND
hwEdit
;
HWND
hwEdit
;
...
@@ -931,6 +965,7 @@ START_TEST(edit)
...
@@ -931,6 +965,7 @@ START_TEST(edit)
test_edit_control_2
();
test_edit_control_2
();
test_edit_control_3
();
test_edit_control_3
();
test_edit_control_4
();
test_edit_control_4
();
test_edit_control_5
();
test_margins
();
test_margins
();
test_text_position
();
test_text_position
();
...
...
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