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:
Vadim Zeitlin 2007-07-14 20:26:07 +00:00
parent d31a4a84fb
commit b20573601f

View File

@ -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));
}