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
9788ba6e
Commit
9788ba6e
authored
Jul 16, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Jul 16, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set clipping region to client window before owner-drawn painting.
parent
08412fb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
listbox.c
controls/listbox.c
+12
-10
No files found.
controls/listbox.c
View file @
9788ba6e
...
...
@@ -484,6 +484,8 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
if
(
IS_OWNERDRAW
(
descr
))
{
DRAWITEMSTRUCT
dis
;
RECT
r
;
HRGN
hrgn
;
if
(
!
item
)
{
...
...
@@ -493,6 +495,16 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
FIXME
(
"called with an out of bounds index %d(%d) in owner draw, Not good.
\n
"
,
index
,
descr
->
nb_items
);
return
;
}
/* some programs mess with the clipping region when
drawing the item, *and* restore the previous region
after they are done, so a region has better to exist
else everything ends clipped */
GetClientRect
(
wnd
->
hwndSelf
,
&
r
);
hrgn
=
CreateRectRgnIndirect
(
&
r
);
SelectClipRgn
(
hdc
,
hrgn
);
DeleteObject
(
hrgn
);
dis
.
CtlType
=
ODT_LISTBOX
;
dis
.
CtlID
=
wnd
->
wIDmenu
;
dis
.
hwndItem
=
wnd
->
hwndSelf
;
...
...
@@ -924,16 +936,6 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
rect
.
right
+=
descr
->
horz_pos
;
}
if
(
IS_OWNERDRAW
(
descr
))
{
RECT
r
;
HRGN
hrgn
;
GetClientRect
(
wnd
->
hwndSelf
,
&
r
);
hrgn
=
CreateRectRgnIndirect
(
&
r
);
SelectClipRgn
(
hdc
,
hrgn
);
DeleteObject
(
hrgn
);
}
if
(
descr
->
font
)
oldFont
=
SelectObject
(
hdc
,
descr
->
font
);
hbrush
=
SendMessageA
(
descr
->
owner
,
WM_CTLCOLORLISTBOX
,
hdc
,
(
LPARAM
)
wnd
->
hwndSelf
);
...
...
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