HWND m_TaskSwitch;
HWND m_TrayNotify;
- CTrayNotifyWnd* m_TrayNotifyInstance;
+ CComPtr<IUnknown> m_TrayNotifyInstance;
DWORD m_Position;
HMONITOR m_Monitor;
if (FAILED_UNEXPECTEDLY(hRet))
return FALSE;
+ /* Create the tray notification window */
+ hRet = CTrayNotifyWnd_CreateInstance(m_hWnd, IID_PPV_ARG(IUnknown, &m_TrayNotifyInstance));
+ if (FAILED_UNEXPECTEDLY(hRet))
+ return FALSE;
+
/* Get the hwnd of the rebar */
hRet = IUnknown_GetWindow(m_TrayBandSite, &m_Rebar);
if (FAILED_UNEXPECTEDLY(hRet))
if (FAILED_UNEXPECTEDLY(hRet))
return FALSE;
- SetWindowTheme(m_Rebar, L"TaskBar", NULL);
+ /* Get the hwnd of the tray notification window */
+ hRet = IUnknown_GetWindow(m_TrayNotifyInstance, &m_TrayNotify);
+ if (FAILED_UNEXPECTEDLY(hRet))
+ return FALSE;
- /* Create the tray notification window */
- m_TrayNotify = CreateTrayNotifyWnd(m_hWnd, &m_TrayNotifyInstance);
+ SetWindowTheme(m_Rebar, L"TaskBar", NULL);
UpdateFonts();