HRESULT CSysTray::InitIcons()
{
+ TRACE("Initializing Notification icons...\n");
for (int i = 0; i < g_NumIcons; i++)
{
HRESULT hr = g_IconHandlers[i].pfnInit(this);
HRESULT CSysTray::ShutdownIcons()
{
+ TRACE("Shutting down Notification icons...\n");
for (int i = 0; i < g_NumIcons; i++)
{
HRESULT hr = g_IconHandlers[i].pfnShutdown(this);
HRESULT CSysTray::UpdateIcons()
{
+ TRACE("Updating Notification icons...\n");
for (int i = 0; i < g_NumIcons; i++)
{
HRESULT hr = g_IconHandlers[i].pfnUpdate(this);
HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip)
{
- NOTIFYICONDATA nim;
+ NOTIFYICONDATA nim = { 0 };
+
+ TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
+
nim.cbSize = sizeof(NOTIFYICONDATA);
- nim.uFlags = NIF_ICON | NIF_STATE | NIF_TIP;
+ nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
nim.hIcon = hIcon;
nim.uID = uId;
nim.uCallbackMessage = uId;
UpdateIcons();
return TRUE;
case WM_DESTROY:
+ KillTimer(1);
ShutdownIcons();
return TRUE;
}