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
a41b8111
Commit
a41b8111
authored
Mar 24, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add support for WM_PRINTCLIENT.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f0e350d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
txthost.c
dlls/riched20/txthost.c
+26
-15
No files found.
dlls/riched20/txthost.c
View file @
a41b8111
...
@@ -1178,51 +1178,62 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
...
@@ -1178,51 +1178,62 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
break
;
break
;
case
WM_PAINT
:
case
WM_PAINT
:
case
WM_PRINTCLIENT
:
{
{
HDC
hdc
;
HDC
hdc
;
RECT
rc
,
client
;
RECT
rc
,
client
,
update
;
PAINTSTRUCT
ps
;
PAINTSTRUCT
ps
;
HBRUSH
brush
=
CreateSolidBrush
(
ITextHost_TxGetSysColor
(
&
host
->
ITextHost_iface
,
COLOR_WINDOW
)
);
HBRUSH
brush
=
CreateSolidBrush
(
ITextHost_TxGetSysColor
(
&
host
->
ITextHost_iface
,
COLOR_WINDOW
)
);
ITextHostImpl_TxGetClientRect
(
&
host
->
ITextHost_iface
,
&
client
);
ITextHostImpl_TxGetClientRect
(
&
host
->
ITextHost_iface
,
&
client
);
if
(
msg
==
WM_PAINT
)
{
hdc
=
BeginPaint
(
hwnd
,
&
ps
);
hdc
=
BeginPaint
(
hwnd
,
&
ps
);
update
=
ps
.
rcPaint
;
}
else
{
hdc
=
(
HDC
)
wparam
;
update
=
client
;
}
brush
=
SelectObject
(
hdc
,
brush
);
brush
=
SelectObject
(
hdc
,
brush
);
/* Erase area outside of the formatting rectangle */
/* Erase area outside of the formatting rectangle */
if
(
ps
.
rcPaint
.
top
<
client
.
top
)
if
(
update
.
top
<
client
.
top
)
{
{
rc
=
ps
.
rcPaint
;
rc
=
update
;
rc
.
bottom
=
client
.
top
;
rc
.
bottom
=
client
.
top
;
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
ps
.
rcPaint
.
top
=
client
.
top
;
update
.
top
=
client
.
top
;
}
}
if
(
ps
.
rcPaint
.
bottom
>
client
.
bottom
)
if
(
update
.
bottom
>
client
.
bottom
)
{
{
rc
=
ps
.
rcPaint
;
rc
=
update
;
rc
.
top
=
client
.
bottom
;
rc
.
top
=
client
.
bottom
;
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
ps
.
rcPaint
.
bottom
=
client
.
bottom
;
update
.
bottom
=
client
.
bottom
;
}
}
if
(
ps
.
rcPaint
.
left
<
client
.
left
)
if
(
update
.
left
<
client
.
left
)
{
{
rc
=
ps
.
rcPaint
;
rc
=
update
;
rc
.
right
=
client
.
left
;
rc
.
right
=
client
.
left
;
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
ps
.
rcPaint
.
left
=
client
.
left
;
update
.
left
=
client
.
left
;
}
}
if
(
ps
.
rcPaint
.
right
>
client
.
right
)
if
(
update
.
right
>
client
.
right
)
{
{
rc
=
ps
.
rcPaint
;
rc
=
update
;
rc
.
left
=
client
.
right
;
rc
.
left
=
client
.
right
;
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
PatBlt
(
hdc
,
rc
.
left
,
rc
.
top
,
rc
.
right
-
rc
.
left
,
rc
.
bottom
-
rc
.
top
,
PATCOPY
);
ps
.
rcPaint
.
right
=
client
.
right
;
update
.
right
=
client
.
right
;
}
}
ITextServices_TxDraw
(
host
->
text_srv
,
DVASPECT_CONTENT
,
0
,
NULL
,
NULL
,
hdc
,
NULL
,
NULL
,
NULL
,
ITextServices_TxDraw
(
host
->
text_srv
,
DVASPECT_CONTENT
,
0
,
NULL
,
NULL
,
hdc
,
NULL
,
NULL
,
NULL
,
&
ps
.
rcPaint
,
NULL
,
0
,
TXTVIEW_ACTIVE
);
&
update
,
NULL
,
0
,
TXTVIEW_ACTIVE
);
DeleteObject
(
SelectObject
(
hdc
,
brush
)
);
DeleteObject
(
SelectObject
(
hdc
,
brush
)
);
EndPaint
(
hwnd
,
&
ps
);
if
(
msg
==
WM_PAINT
)
EndPaint
(
hwnd
,
&
ps
);
return
0
;
return
0
;
}
}
case
EM_REPLACESEL
:
case
EM_REPLACESEL
:
...
...
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