allow setting empty tooltip in SetIcon() (patch 1750994)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d31a4a84fb
commit
b20573601f
@ -143,10 +143,11 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
||||
notifyData.hIcon = GetHiconOf(icon);
|
||||
}
|
||||
|
||||
// set NIF_TIP even for an empty tooltip: otherwise it would be impossible
|
||||
// to remove an existing tooltip using this function
|
||||
notifyData.uFlags |= NIF_TIP;
|
||||
if ( !tooltip.empty() )
|
||||
{
|
||||
notifyData.uFlags |= NIF_TIP;
|
||||
// lstrcpyn(notifyData.szTip, tooltip.c_str(), WXSIZEOF(notifyData.szTip));
|
||||
wxStrncpy(notifyData.szTip, tooltip.c_str(), WXSIZEOF(notifyData.szTip));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user