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
acfd725d
Commit
acfd725d
authored
Oct 25, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Don't leak memory when an app sends TTM_SETTITLE twice.
- An lParam of 0 indicates that the title should be removed.
parent
a2c8af42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
14 deletions
+32
-14
tooltips.c
dlls/comctl32/tooltips.c
+32
-14
No files found.
dlls/comctl32/tooltips.c
View file @
acfd725d
...
...
@@ -1927,16 +1927,25 @@ TOOLTIPS_SetTitleA (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
LPCSTR
pszTitle
=
(
LPCSTR
)
lParam
;
UINT
uTitleIcon
=
(
UINT
)
wParam
;
UINT
_PTR
uTitleIcon
=
(
UINT_PTR
)
wParam
;
UINT
size
;
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
pszTitle
,
(
void
*
)
uTitleIcon
);
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
debugstr_a
(
pszTitle
),
(
void
*
)
uTitleIcon
);
Free
(
infoPtr
->
pszTitle
);
if
(
pszTitle
)
{
size
=
sizeof
(
WCHAR
)
*
MultiByteToWideChar
(
CP_ACP
,
0
,
pszTitle
,
-
1
,
NULL
,
0
);
infoPtr
->
pszTitle
=
Alloc
(
size
);
if
(
!
infoPtr
->
pszTitle
)
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pszTitle
,
-
1
,
infoPtr
->
pszTitle
,
size
/
sizeof
(
WCHAR
));
}
else
infoPtr
->
pszTitle
=
NULL
;
size
=
sizeof
(
WCHAR
)
*
MultiByteToWideChar
(
CP_ACP
,
0
,
pszTitle
,
-
1
,
NULL
,
0
);
infoPtr
->
pszTitle
=
Alloc
(
size
);
if
(
!
infoPtr
->
pszTitle
)
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pszTitle
,
-
1
,
infoPtr
->
pszTitle
,
size
/
sizeof
(
WCHAR
));
if
(
uTitleIcon
<=
TTI_ERROR
)
infoPtr
->
hTitleIcon
=
hTooltipIcons
[
uTitleIcon
];
else
...
...
@@ -1951,16 +1960,25 @@ TOOLTIPS_SetTitleW (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO
*
infoPtr
=
TOOLTIPS_GetInfoPtr
(
hwnd
);
LPCWSTR
pszTitle
=
(
LPCWSTR
)
lParam
;
UINT
uTitleIcon
=
(
UINT
)
wParam
;
UINT
_PTR
uTitleIcon
=
(
UINT_PTR
)
wParam
;
UINT
size
;
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
debugstr_w
(
pszTitle
),
(
void
*
)
uTitleIcon
);
TRACE
(
"hwnd = %p, title = %s, icon = %p
\n
"
,
hwnd
,
debugstr_w
(
pszTitle
),
(
void
*
)
uTitleIcon
);
Free
(
infoPtr
->
pszTitle
);
if
(
pszTitle
)
{
size
=
(
strlenW
(
pszTitle
)
+
1
)
*
sizeof
(
WCHAR
);
infoPtr
->
pszTitle
=
Alloc
(
size
);
if
(
!
infoPtr
->
pszTitle
)
return
FALSE
;
memcpy
(
infoPtr
->
pszTitle
,
pszTitle
,
size
);
}
else
infoPtr
->
pszTitle
=
NULL
;
size
=
(
strlenW
(
pszTitle
)
+
1
)
*
sizeof
(
WCHAR
);
infoPtr
->
pszTitle
=
Alloc
(
size
);
if
(
!
infoPtr
->
pszTitle
)
return
FALSE
;
memcpy
(
infoPtr
->
pszTitle
,
pszTitle
,
size
);
if
(
uTitleIcon
<=
TTI_ERROR
)
infoPtr
->
hTitleIcon
=
hTooltipIcons
[
uTitleIcon
];
else
...
...
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