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
86a0e50a
Commit
86a0e50a
authored
Jul 16, 2004
by
Jon Griffiths
Committed by
Alexandre Julliard
Jul 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash on NULL tab text.
parent
7ae86454
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
+27
-18
tab.c
dlls/comctl32/tab.c
+27
-18
No files found.
dlls/comctl32/tab.c
View file @
86a0e50a
...
...
@@ -1145,7 +1145,7 @@ static void TAB_SetItemBounds (HWND hwnd)
/* Set the leftmost position of the tab. */
infoPtr
->
items
[
curItem
].
rect
.
left
=
curItemLeftPos
;
if
(
lStyle
&
TCS_FIXEDWIDTH
)
if
(
(
lStyle
&
TCS_FIXEDWIDTH
)
||
!
infoPtr
->
items
[
curItem
].
pszText
)
{
infoPtr
->
items
[
curItem
].
rect
.
right
=
infoPtr
->
items
[
curItem
].
rect
.
left
+
max
(
infoPtr
->
tabWidth
,
icon_width
);
...
...
@@ -1682,8 +1682,11 @@ TAB_DrawItemInterior
rcText
.
left
=
rcText
.
top
=
rcText
.
right
=
rcText
.
bottom
=
0
;
/* get the rectangle that the text fits in */
DrawTextW
(
hdc
,
infoPtr
->
items
[
iItem
].
pszText
,
-
1
,
&
rcText
,
DT_CALCRECT
);
if
(
infoPtr
->
items
[
iItem
].
pszText
)
{
DrawTextW
(
hdc
,
infoPtr
->
items
[
iItem
].
pszText
,
-
1
,
&
rcText
,
DT_CALCRECT
);
}
/*
* If not owner draw, then do the drawing ourselves.
*
...
...
@@ -1824,14 +1827,17 @@ TAB_DrawItemInterior
hFont
=
CreateFontIndirectA
(
&
logfont
);
SelectObject
(
hdc
,
hFont
);
ExtTextOutW
(
hdc
,
(
lStyle
&
TCS_BOTTOM
)
?
drawRect
->
right
:
drawRect
->
left
,
(
!
(
lStyle
&
TCS_BOTTOM
))
?
drawRect
->
bottom
:
drawRect
->
top
,
ETO_CLIPPED
,
drawRect
,
infoPtr
->
items
[
iItem
].
pszText
,
lstrlenW
(
infoPtr
->
items
[
iItem
].
pszText
),
0
);
if
(
infoPtr
->
items
[
iItem
].
pszText
)
{
ExtTextOutW
(
hdc
,
(
lStyle
&
TCS_BOTTOM
)
?
drawRect
->
right
:
drawRect
->
left
,
(
!
(
lStyle
&
TCS_BOTTOM
))
?
drawRect
->
bottom
:
drawRect
->
top
,
ETO_CLIPPED
,
drawRect
,
infoPtr
->
items
[
iItem
].
pszText
,
lstrlenW
(
infoPtr
->
items
[
iItem
].
pszText
),
0
);
}
DeleteObject
(
hFont
);
}
...
...
@@ -1841,14 +1847,17 @@ TAB_DrawItemInterior
debugstr_w
(
infoPtr
->
items
[
iItem
].
pszText
),
center_offset_h
,
center_offset_v
,
drawRect
->
left
,
drawRect
->
top
,
drawRect
->
right
,
drawRect
->
bottom
,
(
rcText
.
right
-
rcText
.
left
));
DrawTextW
(
hdc
,
infoPtr
->
items
[
iItem
].
pszText
,
lstrlenW
(
infoPtr
->
items
[
iItem
].
pszText
),
drawRect
,
DT_LEFT
|
DT_SINGLELINE
if
(
infoPtr
->
items
[
iItem
].
pszText
)
{
DrawTextW
(
hdc
,
infoPtr
->
items
[
iItem
].
pszText
,
lstrlenW
(
infoPtr
->
items
[
iItem
].
pszText
),
drawRect
,
DT_LEFT
|
DT_SINGLELINE
);
}
}
*
drawRect
=
rcTemp
;
/* restore drawRect */
...
...
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