[EXPLORER-NEW]
[reactos.git] / dll / shellext / stobject / csystray.cpp
index 55af397..ac7ae7e 100644 (file)
@@ -22,6 +22,7 @@ CSysTray::~CSysTray() {}
 
 HRESULT CSysTray::InitIcons()
 {
+    TRACE("Initializing Notification icons...\n");
     for (int i = 0; i < g_NumIcons; i++)
     {
         HRESULT hr = g_IconHandlers[i].pfnInit(this);
@@ -34,6 +35,7 @@ HRESULT CSysTray::InitIcons()
 
 HRESULT CSysTray::ShutdownIcons()
 {
+    TRACE("Shutting down Notification icons...\n");
     for (int i = 0; i < g_NumIcons; i++)
     {
         HRESULT hr = g_IconHandlers[i].pfnShutdown(this);
@@ -46,6 +48,7 @@ HRESULT CSysTray::ShutdownIcons()
 
 HRESULT CSysTray::UpdateIcons()
 {
+    TRACE("Updating Notification icons...\n");
     for (int i = 0; i < g_NumIcons; i++)
     {
         HRESULT hr = g_IconHandlers[i].pfnUpdate(this);
@@ -73,9 +76,12 @@ HRESULT CSysTray::ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 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;
@@ -133,7 +139,7 @@ HRESULT CSysTray::SysTrayThreadProc()
 
 HRESULT CSysTray::CreateSysTrayThread()
 {
-    DbgPrint("CSysTray Init TODO: Initialize tray icon handlers.\n");
+    TRACE("CSysTray Init TODO: Initialize tray icon handlers.\n");
 
     HANDLE hThread = CreateThread(NULL, 0, s_SysTrayThreadProc, this, 0, NULL);
 
@@ -192,7 +198,7 @@ BOOL CSysTray::ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
         return TRUE;
     }
 
-    DbgPrint("SysTray message received %u (%08p %08p)\n", uMsg, wParam, lParam);
+    TRACE("SysTray message received %u (%08p %08p)\n", uMsg, wParam, lParam);
 
     hr = ProcessIconMessage(uMsg, wParam, lParam);
     if (FAILED(hr))