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
fa5230fb
Commit
fa5230fb
authored
Sep 25, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Sep 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: EM_SETCHARFORMAT must return 1 on success, not 0.
parent
8e1151ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
editor.c
dlls/riched20/editor.c
+1
-1
editor.c
dlls/riched20/tests/editor.c
+13
-4
No files found.
dlls/riched20/editor.c
View file @
fa5230fb
...
...
@@ -1748,7 +1748,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ME_CommitUndo
(
editor
);
if
(
bRepaint
)
ME_RewrapRepaint
(
editor
);
return
0
;
return
1
;
}
case
EM_GETCHARFORMAT
:
{
...
...
dlls/riched20/tests/editor.c
View file @
fa5230fb
...
...
@@ -366,7 +366,8 @@ static void test_EM_SETTEXTMODE(void)
/*EM_SETCHARFORMAT is not yet fully implemented for all WPARAMs in wine;
however, SCF_ALL has been implemented*/
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"wine"
);
/*Select the string "wine"*/
...
...
@@ -379,7 +380,8 @@ static void test_EM_SETTEXTMODE(void)
/*Reset the formatting to default*/
cf2
.
dwEffects
=
CFE_ITALIC
^
cf2
.
dwEffects
;
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
/*Clear the text in the control*/
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
""
);
...
...
@@ -472,6 +474,7 @@ static void test_TM_PLAINTEXT(void)
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
CHARFORMAT2
cf2
,
cf2test
;
CHARRANGE
cr
;
int
rc
=
0
;
/*Switch to plain text mode*/
...
...
@@ -494,7 +497,10 @@ static void test_TM_PLAINTEXT(void)
cf2
.
dwMask
=
CFM_BOLD
|
cf2
.
dwMask
;
cf2
.
dwEffects
=
CFE_BOLD
^
cf2
.
dwEffects
;
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_SELECTION
,
(
LPARAM
)
&
cf2
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_SELECTION
,
(
LPARAM
)
&
cf2
);
todo_wine
{
ok
(
rc
==
0
,
"EM_SETCHARFORMAT returned %d instead of 0
\n
"
,
rc
);
}
/*Get the formatting of those characters*/
...
...
@@ -534,7 +540,8 @@ static void test_TM_PLAINTEXT(void)
SendMessage
(
hwndRichEdit
,
EM_GETCHARFORMAT
,
(
WPARAM
)
SCF_DEFAULT
,
(
LPARAM
)
&
cf2
);
cf2
.
dwMask
|=
CFM_ITALIC
;
cf2
.
dwEffects
^=
CFE_ITALIC
;
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
/*Set the text in the control to "wine", which will be bold and italicized*/
...
...
@@ -1472,6 +1479,8 @@ static void test_EM_GETMODIFY(void)
cf2
.
dwMask
=
CFM_ITALIC
|
cf2
.
dwMask
;
cf2
.
dwEffects
=
CFE_ITALIC
^
cf2
.
dwEffects
;
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
result
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
ok
(
result
==
1
,
"EM_SETCHARFORMAT returned %ld instead of 1
\n
"
,
result
);
result
=
SendMessage
(
hwndRichEdit
,
EM_GETMODIFY
,
0
,
0
);
ok
(
result
!=
0
,
"EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT
\n
"
);
...
...
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