X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53a118d6fe4ecbeda81c0eb2bef65e204b3588ad..7738af5957ace396793ee291a280d5a3dbd4821f:/src/msw/taskbar.cpp diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index b95bd215c2..0a6277803f 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -17,6 +17,8 @@ #pragma hdrstop #endif +#if wxUSE_TASKBARICON + #ifndef WX_PRECOMP #include "wx/window.h" #include "wx/frame.h" @@ -143,10 +145,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)); } @@ -287,3 +290,6 @@ long wxTaskBarIcon::WindowProc(unsigned int msg, return 0; } + +#endif // wxUSE_TASKBARICON +