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
a1aaf97c
Commit
a1aaf97c
authored
Jan 11, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added tests to show that options are stored internally.
parent
d2685e7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
editor.c
dlls/riched20/tests/editor.c
+23
-0
No files found.
dlls/riched20/tests/editor.c
View file @
a1aaf97c
...
@@ -1458,6 +1458,10 @@ static void test_EM_SETOPTIONS(void)
...
@@ -1458,6 +1458,10 @@ static void test_EM_SETOPTIONS(void)
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
static
const
char
text
[]
=
"Hello. My name is RichEdit!"
;
static
const
char
text
[]
=
"Hello. My name is RichEdit!"
;
char
buffer
[
1024
]
=
{
0
};
char
buffer
[
1024
]
=
{
0
};
DWORD
dwStyle
,
options
,
oldOptions
;
DWORD
optionStyles
=
ES_AUTOVSCROLL
|
ES_AUTOHSCROLL
|
ES_NOHIDESEL
|
ES_READONLY
|
ES_WANTRETURN
|
ES_SAVESEL
|
ES_SELECTIONBAR
|
ES_VERTICAL
;
/* NEGATIVE TESTING - NO OPTIONS SET */
/* NEGATIVE TESTING - NO OPTIONS SET */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text
);
...
@@ -1480,6 +1484,25 @@ static void test_EM_SETOPTIONS(void)
...
@@ -1480,6 +1484,25 @@ static void test_EM_SETOPTIONS(void)
ok
(
buffer
[
0
]
==
text
[
0
],
ok
(
buffer
[
0
]
==
text
[
0
],
"EM_SETOPTIONS: Text changed! s1:%s s2:%s
\n
"
,
text
,
buffer
);
"EM_SETOPTIONS: Text changed! s1:%s s2:%s
\n
"
,
text
,
buffer
);
/* EM_SETOPTIONS changes the window style, but changing the
* window style does not change the options. */
dwStyle
=
GetWindowLong
(
hwndRichEdit
,
GWL_STYLE
);
ok
(
dwStyle
&
ES_READONLY
,
"Readonly style not set by EM_SETOPTIONS
\n
"
);
SetWindowLong
(
hwndRichEdit
,
GWL_STYLE
,
dwStyle
&
~
ES_READONLY
);
options
=
SendMessage
(
hwndRichEdit
,
EM_GETOPTIONS
,
0
,
0
);
todo_wine
ok
(
options
&
ES_READONLY
,
"Readonly option set by SetWindowLong
\n
"
);
/* Confirm that the text is still read only. */
SendMessage
(
hwndRichEdit
,
WM_CHAR
,
'a'
,
(
'a'
<<
16
)
|
0x0001
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
todo_wine
ok
(
buffer
[
0
]
==
text
[
0
],
"EM_SETOPTIONS: Text changed! s1:%s s2:%s
\n
"
,
text
,
buffer
);
oldOptions
=
options
;
SetWindowLong
(
hwndRichEdit
,
GWL_STYLE
,
dwStyle
|
optionStyles
);
options
=
SendMessage
(
hwndRichEdit
,
EM_GETOPTIONS
,
0
,
0
);
todo_wine
ok
(
options
==
oldOptions
,
"Options set by SetWindowLong (%x -> %x)
\n
"
,
oldOptions
,
options
);
DestroyWindow
(
hwndRichEdit
);
DestroyWindow
(
hwndRichEdit
);
}
}
...
...
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