From 9096cacba8b48f747344b2f580bcda1eca9363f8 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 7 Mar 2016 16:06:34 -0500 Subject: [PATCH] tray icon added --- Win32/Win32App.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Win32/Win32App.cpp b/Win32/Win32App.cpp index a7bda173..f69045d9 100644 --- a/Win32/Win32App.cpp +++ b/Win32/Win32App.cpp @@ -129,7 +129,13 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; } + // init + int argc; + auto argv = CommandLineToArgvW (cmdline, &argc) + Daemon.init(argc, argv); + LocalFree (argv); // start + Daemon.start (); // main loop MSG msg; while (GetMessage (&msg, NULL, 0, 0 )) @@ -138,6 +144,7 @@ static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa DispatchMessage (&msg); } // atop + Daemon.stop (); // terminate UnregisterClass (I2PD_WIN32_CLASSNAME, hInst); return msg.wParam;