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
c8483216
Commit
c8483216
authored
Jan 10, 2005
by
Evan Deaubl
Committed by
Alexandre Julliard
Jan 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GetItemA/W on header controls should handle message even if index is
invalid.
parent
a3026ca8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
20 deletions
+34
-20
header.c
dlls/comctl32/header.c
+34
-20
No files found.
dlls/comctl32/header.c
View file @
c8483216
...
...
@@ -688,29 +688,36 @@ HEADER_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
phdi
)
return
FALSE
;
if
((
nItem
<
0
)
||
(
nItem
>=
(
INT
)
infoPtr
->
uNumItem
))
return
FALSE
;
TRACE
(
"[nItem=%d]
\n
"
,
nItem
);
if
(
phdi
->
mask
==
0
)
return
TRUE
;
lpItem
=
&
infoPtr
->
items
[
nItem
];
if
((
nItem
<
0
)
||
(
nItem
>=
(
INT
)
infoPtr
->
uNumItem
))
{
lpItem
=
NULL
;
}
else
{
lpItem
=
&
infoPtr
->
items
[
nItem
];
}
if
(
phdi
->
mask
&
HDI_BITMAP
)
phdi
->
hbm
=
lpItem
->
hbm
;
phdi
->
hbm
=
(
lpItem
!=
NULL
)
?
lpItem
->
hbm
:
0
;
if
(
phdi
->
mask
&
HDI_FORMAT
)
phdi
->
fmt
=
lpItem
->
fmt
;
phdi
->
fmt
=
(
lpItem
!=
NULL
)
?
lpItem
->
fmt
:
0
;
if
(
phdi
->
mask
&
HDI_WIDTH
)
phdi
->
cxy
=
lpItem
->
cxy
;
phdi
->
cxy
=
(
lpItem
!=
NULL
)
?
lpItem
->
cxy
:
0
;
if
(
phdi
->
mask
&
HDI_LPARAM
)
phdi
->
lParam
=
lpItem
->
lParam
;
phdi
->
lParam
=
(
lpItem
!=
NULL
)
?
lpItem
->
lParam
:
0
;
if
(
phdi
->
mask
&
HDI_TEXT
)
{
if
(
lpItem
->
pszText
!=
LPSTR_TEXTCALLBACKW
)
{
if
(
lpItem
==
NULL
)
{
*
phdi
->
pszText
=
0
;
}
else
if
(
lpItem
->
pszText
!=
LPSTR_TEXTCALLBACKW
)
{
if
(
lpItem
->
pszText
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpItem
->
pszText
,
-
1
,
phdi
->
pszText
,
phdi
->
cchTextMax
,
NULL
,
NULL
);
...
...
@@ -722,10 +729,10 @@ HEADER_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
if
(
phdi
->
mask
&
HDI_IMAGE
)
phdi
->
iImage
=
lpItem
->
iImage
;
phdi
->
iImage
=
(
lpItem
!=
NULL
)
?
lpItem
->
iImage
:
0
;
if
(
phdi
->
mask
&
HDI_ORDER
)
phdi
->
iOrder
=
lpItem
->
iOrder
;
phdi
->
iOrder
=
(
lpItem
!=
NULL
)
?
lpItem
->
iOrder
:
0
;
return
TRUE
;
}
...
...
@@ -741,29 +748,36 @@ HEADER_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
!
phdi
)
return
FALSE
;
if
((
nItem
<
0
)
||
(
nItem
>=
(
INT
)
infoPtr
->
uNumItem
))
return
FALSE
;
TRACE
(
"[nItem=%d]
\n
"
,
nItem
);
if
(
phdi
->
mask
==
0
)
return
TRUE
;
lpItem
=
&
infoPtr
->
items
[
nItem
];
if
((
nItem
<
0
)
||
(
nItem
>=
(
INT
)
infoPtr
->
uNumItem
))
{
lpItem
=
NULL
;
}
else
{
lpItem
=
&
infoPtr
->
items
[
nItem
];
}
if
(
phdi
->
mask
&
HDI_BITMAP
)
phdi
->
hbm
=
lpItem
->
hbm
;
phdi
->
hbm
=
(
lpItem
!=
NULL
)
?
lpItem
->
hbm
:
0
;
if
(
phdi
->
mask
&
HDI_FORMAT
)
phdi
->
fmt
=
lpItem
->
fmt
;
phdi
->
fmt
=
(
lpItem
!=
NULL
)
?
lpItem
->
fmt
:
0
;
if
(
phdi
->
mask
&
HDI_WIDTH
)
phdi
->
cxy
=
lpItem
->
cxy
;
phdi
->
cxy
=
(
lpItem
!=
NULL
)
?
lpItem
->
cxy
:
0
;
if
(
phdi
->
mask
&
HDI_LPARAM
)
phdi
->
lParam
=
lpItem
->
lParam
;
phdi
->
lParam
=
(
lpItem
!=
NULL
)
?
lpItem
->
lParam
:
0
;
if
(
phdi
->
mask
&
HDI_TEXT
)
{
if
(
lpItem
->
pszText
!=
LPSTR_TEXTCALLBACKW
)
{
if
(
lpItem
==
NULL
)
{
*
phdi
->
pszText
=
0
;
}
else
if
(
lpItem
->
pszText
!=
LPSTR_TEXTCALLBACKW
)
{
if
(
lpItem
->
pszText
)
lstrcpynW
(
phdi
->
pszText
,
lpItem
->
pszText
,
phdi
->
cchTextMax
);
else
...
...
@@ -774,10 +788,10 @@ HEADER_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
if
(
phdi
->
mask
&
HDI_IMAGE
)
phdi
->
iImage
=
lpItem
->
iImage
;
phdi
->
iImage
=
(
lpItem
!=
NULL
)
?
lpItem
->
iImage
:
0
;
if
(
phdi
->
mask
&
HDI_ORDER
)
phdi
->
iOrder
=
lpItem
->
iOrder
;
phdi
->
iOrder
=
(
lpItem
!=
NULL
)
?
lpItem
->
iOrder
:
0
;
return
TRUE
;
}
...
...
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