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
dbcf2e39
Commit
dbcf2e39
authored
Jan 23, 2007
by
Matt Finnicum
Committed by
Alexandre Julliard
Jan 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Implement EM_LIMITTEXT and some simple tests.
parent
dc98ac1a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
editor.c
dlls/riched20/editor.c
+9
-2
editor.c
dlls/riched20/tests/editor.c
+41
-0
No files found.
dlls/riched20/editor.c
View file @
dbcf2e39
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
- EM_GETWORDWRAPMODE 1.0asian
- EM_GETWORDWRAPMODE 1.0asian
+ EM_GETZOOM 3.0
+ EM_GETZOOM 3.0
+ EM_HIDESELECTION
+ EM_HIDESELECTION
- EM_LIMITTEXT
+ EM_LIMITTEXT (Also called EM_SETLIMITTEXT)
+ EM_LINEFROMCHAR
+ EM_LINEFROMCHAR
+ EM_LINEINDEX
+ EM_LINEINDEX
+ EM_LINELENGTH
+ EM_LINELENGTH
...
@@ -1429,7 +1429,6 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
...
@@ -1429,7 +1429,6 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
UNSUPPORTED_MSG
(
EM_GETTYPOGRAPHYOPTIONS
)
UNSUPPORTED_MSG
(
EM_GETTYPOGRAPHYOPTIONS
)
UNSUPPORTED_MSG
(
EM_GETUNDONAME
)
UNSUPPORTED_MSG
(
EM_GETUNDONAME
)
UNSUPPORTED_MSG
(
EM_GETWORDBREAKPROCEX
)
UNSUPPORTED_MSG
(
EM_GETWORDBREAKPROCEX
)
UNSUPPORTED_MSG
(
EM_LIMITTEXT
)
/* also known as EM_SETLIMITTEXT */
UNSUPPORTED_MSG
(
EM_PASTESPECIAL
)
UNSUPPORTED_MSG
(
EM_PASTESPECIAL
)
UNSUPPORTED_MSG
(
EM_SELECTIONTYPE
)
UNSUPPORTED_MSG
(
EM_SELECTIONTYPE
)
UNSUPPORTED_MSG
(
EM_SETBIDIOPTIONS
)
UNSUPPORTED_MSG
(
EM_SETBIDIOPTIONS
)
...
@@ -2185,6 +2184,14 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
...
@@ -2185,6 +2184,14 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
editor
->
nTextLimit
=
(
int
)
lParam
;
editor
->
nTextLimit
=
(
int
)
lParam
;
return
0
;
return
0
;
}
}
case
EM_LIMITTEXT
:
{
if
(
wParam
==
0
)
editor
->
nTextLimit
=
65536
;
else
editor
->
nTextLimit
=
(
int
)
wParam
;
return
0
;
}
case
EM_GETLIMITTEXT
:
case
EM_GETLIMITTEXT
:
{
{
return
editor
->
nTextLimit
;
return
editor
->
nTextLimit
;
...
...
dlls/riched20/tests/editor.c
View file @
dbcf2e39
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Unit test suite for rich edit control
* Unit test suite for rich edit control
*
*
* Copyright 2006 Google (Thomas Kho)
* Copyright 2006 Google (Thomas Kho)
* Copyright 2007 Matt Finnicum
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -975,6 +976,45 @@ static void test_EM_SETTEXTEX(void)
...
@@ -975,6 +976,45 @@ static void test_EM_SETTEXTEX(void)
DestroyWindow
(
hwndRichEdit
);
DestroyWindow
(
hwndRichEdit
);
}
}
static
void
test_EM_LIMITTEXT
(
void
)
{
int
ret
;
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
/* The main purpose of this test is to demonstrate that the nonsense in MSDN
* about setting the length to -1 for multiline edit controls doesn't happen.
*/
/* Don't check default gettextlimit case. That's done in other tests */
/* Set textlimit to 100 */
SendMessage
(
hwndRichEdit
,
EM_LIMITTEXT
,
100
,
0
);
ret
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
ok
(
ret
==
100
,
"EM_LIMITTEXT: set to 100, returned: %d, expected: 100
\n
"
,
ret
);
/* Set textlimit to 0 */
SendMessage
(
hwndRichEdit
,
EM_LIMITTEXT
,
0
,
0
);
ret
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
ok
(
ret
==
65536
,
"EM_LIMITTEXT: set to 0, returned: %d, expected: 65536
\n
"
,
ret
);
/* Set textlimit to -1 */
SendMessage
(
hwndRichEdit
,
EM_LIMITTEXT
,
-
1
,
0
);
ret
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
ok
(
ret
==
-
1
,
"EM_LIMITTEXT: set to -1, returned: %d, expected: -1
\n
"
,
ret
);
/* Set textlimit to -2 */
SendMessage
(
hwndRichEdit
,
EM_LIMITTEXT
,
-
2
,
0
);
ret
=
SendMessage
(
hwndRichEdit
,
EM_GETLIMITTEXT
,
0
,
0
);
ok
(
ret
==
-
2
,
"EM_LIMITTEXT: set to -2, returned: %d, expected: -2
\n
"
,
ret
);
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_EM_EXLIMITTEXT
(
void
)
static
void
test_EM_EXLIMITTEXT
(
void
)
{
{
...
@@ -1443,6 +1483,7 @@ START_TEST( editor )
...
@@ -1443,6 +1483,7 @@ START_TEST( editor )
test_EM_SETUNDOLIMIT
();
test_EM_SETUNDOLIMIT
();
test_ES_PASSWORD
();
test_ES_PASSWORD
();
test_EM_SETTEXTEX
();
test_EM_SETTEXTEX
();
test_EM_LIMITTEXT
();
test_EM_EXLIMITTEXT
();
test_EM_EXLIMITTEXT
();
test_EM_GETLIMITTEXT
();
test_EM_GETLIMITTEXT
();
test_WM_SETFONT
();
test_WM_SETFONT
();
...
...
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