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
8caa407c
Commit
8caa407c
authored
Sep 24, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
Sep 24, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In WM_DRAWITEM, always calls the app with a valid current focus_item.
parent
954a413c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
listbox.c
controls/listbox.c
+8
-12
No files found.
controls/listbox.c
View file @
8caa407c
...
...
@@ -488,7 +488,7 @@ static INT LISTBOX_GetItemFromPoint( WND *wnd, LB_DESCR *descr,
* Paint an item.
*/
static
void
LISTBOX_PaintItem
(
WND
*
wnd
,
LB_DESCR
*
descr
,
HDC
hdc
,
const
RECT
*
rect
,
INT
index
,
UINT
action
)
const
RECT
*
rect
,
INT
index
,
UINT
action
,
BOOL
ignoreFocus
)
{
LB_ITEMDATA
*
item
=
NULL
;
if
(
index
<
descr
->
nb_items
)
item
=
&
descr
->
items
[
index
];
...
...
@@ -525,7 +525,7 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
dis
.
itemID
=
index
;
dis
.
itemState
=
0
;
if
(
item
&&
item
->
selected
)
dis
.
itemState
|=
ODS_SELECTED
;
if
((
descr
->
focus_item
==
index
)
&&
if
(
!
ignoreFocus
&&
(
descr
->
focus_item
==
index
)
&&
(
descr
->
caret_on
)
&&
(
descr
->
in_focus
))
dis
.
itemState
|=
ODS_FOCUS
;
if
(
wnd
->
dwStyle
&
WS_DISABLED
)
dis
.
itemState
|=
ODS_DISABLED
;
...
...
@@ -578,7 +578,7 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC hdc,
SetBkColor
(
hdc
,
oldBk
);
SetTextColor
(
hdc
,
oldText
);
}
if
((
descr
->
focus_item
==
index
)
&&
if
(
!
ignoreFocus
&&
(
descr
->
focus_item
==
index
)
&&
(
descr
->
caret_on
)
&&
(
descr
->
in_focus
))
DrawFocusRect
(
hdc
,
rect
);
}
...
...
@@ -641,7 +641,7 @@ static void LISTBOX_RepaintItem( WND *wnd, LB_DESCR *descr, INT index,
if
(
wnd
->
dwStyle
&
WS_DISABLED
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
)
);
SetWindowOrgEx
(
hdc
,
descr
->
horz_pos
,
0
,
NULL
);
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
rect
,
index
,
action
);
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
rect
,
index
,
action
,
FALSE
);
if
(
oldFont
)
SelectObject
(
hdc
,
oldFont
);
if
(
oldBrush
)
SelectObject
(
hdc
,
oldBrush
);
ReleaseDC
(
wnd
->
hwndSelf
,
hdc
);
...
...
@@ -935,7 +935,6 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
RECT
focusRect
=
{
-
1
,
-
1
,
-
1
,
-
1
};
HFONT
oldFont
=
0
;
HBRUSH
hbrush
,
oldBrush
=
0
;
INT
focusItem
;
if
(
descr
->
style
&
LBS_NOREDRAW
)
return
0
;
...
...
@@ -961,14 +960,12 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
/* Special case for empty listbox: paint focus rect */
rect
.
bottom
=
rect
.
top
+
descr
->
item_height
;
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
rect
,
descr
->
focus_item
,
ODA_FOCUS
);
ODA_FOCUS
,
FALSE
);
rect
.
top
=
rect
.
bottom
;
}
/* Paint all the item, regarding the selection
Focus state will be painted after */
focusItem
=
descr
->
focus_item
;
descr
->
focus_item
=
-
1
;
for
(
i
=
descr
->
top_item
;
i
<
descr
->
nb_items
;
i
++
)
{
...
...
@@ -977,7 +974,7 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
else
rect
.
bottom
=
rect
.
top
+
descr
->
items
[
i
].
height
;
if
(
i
==
focusI
tem
)
if
(
i
==
descr
->
focus_i
tem
)
{
/* keep the focus rect, to paint the focus item after */
focusRect
.
left
=
rect
.
left
;
...
...
@@ -985,7 +982,7 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
focusRect
.
top
=
rect
.
top
;
focusRect
.
bottom
=
rect
.
bottom
;
}
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
rect
,
i
,
ODA_DRAWENTIRE
);
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
rect
,
i
,
ODA_DRAWENTIRE
,
TRUE
);
rect
.
top
=
rect
.
bottom
;
if
((
descr
->
style
&
LBS_MULTICOLUMN
)
&&
!
col_pos
)
...
...
@@ -1015,9 +1012,8 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
}
/* Paint the focus item now */
descr
->
focus_item
=
focusItem
;
if
(
focusRect
.
top
!=
focusRect
.
bottom
&&
descr
->
caret_on
)
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
focusRect
,
descr
->
focus_item
,
ODA_FOCUS
);
LISTBOX_PaintItem
(
wnd
,
descr
,
hdc
,
&
focusRect
,
descr
->
focus_item
,
ODA_FOCUS
,
FALSE
);
if
(
!
IS_OWNERDRAW
(
descr
))
{
...
...
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