From b20573601fb6a6f350eb155433c39ca1532a226d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 14 Jul 2007 20:26:07 +0000 Subject: [PATCH] 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 --- src/msw/taskbar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index b95bd215c2..3ed327f627 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -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)); }