bool ok = wxShellNotifyIcon(m_iconAdded ? NIM_MODIFY
: NIM_ADD, ¬ifyData) != 0;
+ if ( !ok )
+ {
+ wxLogLastError(wxT("wxShellNotifyIcon(NIM_MODIFY/ADD)"));
+ }
+
if ( !m_iconAdded && ok )
m_iconAdded = true;
int flags)
{
wxCHECK_MSG( m_iconAdded, false,
- _T("can't be used before the icon is created") );
+ wxT("can't be used before the icon is created") );
const HWND hwnd = GetHwndOf(m_win);
notifyData.uFlags = 0;
notifyData.uVersion = 3 /* NOTIFYICON_VERSION for Windows XP */;
- wxShellNotifyIcon(NIM_SETVERSION, ¬ifyData);
-
+ if ( !wxShellNotifyIcon(NIM_SETVERSION, ¬ifyData) )
+ {
+ wxLogLastError(wxT("wxShellNotifyIcon(NIM_SETVERSION)"));
+ }
// do show the balloon now
notifyData = NotifyIconData(hwnd);
else if ( flags & wxICON_ERROR )
notifyData.dwInfoFlags |= NIIF_ERROR;
- return wxShellNotifyIcon(NIM_MODIFY, ¬ifyData) != 0;
+ bool ok = wxShellNotifyIcon(NIM_MODIFY, ¬ifyData) != 0;
+ if ( !ok )
+ {
+ wxLogLastError(wxT("wxShellNotifyIcon(NIM_MODIFY)"));
+ }
+
+ return ok;
}
#endif // wxUSE_TASKBARICON_BALLOONS
NotifyIconData notifyData(GetHwndOf(m_win));
- return wxShellNotifyIcon(NIM_DELETE, ¬ifyData) != 0;
+ bool ok = wxShellNotifyIcon(NIM_DELETE, ¬ifyData) != 0;
+ if ( !ok )
+ {
+ wxLogLastError(wxT("wxShellNotifyIcon(NIM_DELETE)"));
+ }
+
+ return ok;
}
#if wxUSE_MENUS
bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
{
- wxASSERT_MSG( m_win != NULL, _T("taskbar icon not initialized") );
+ wxASSERT_MSG( m_win != NULL, wxT("taskbar icon not initialized") );
static bool s_inPopup = false;