@@ -552,13 +552,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
552552 // This is the handle for our window
553553 hCurrentInstance = hInstance;
554554
555- // WNDCLASS wincl;
556- // ZeroMemory(&wincl, sizeof(wincl));
557- // wincl.hInstance = hInstance;
558- // wincl.lpszClassName = szProgramName;
559- // wincl.lpfnWndProc = WindowProc;
560- // ATOM szWindowClass = RegisterClassEx(&wincl);
561-
562555 WNDCLASSEX wcex = { sizeof (wcex) };
563556 // wcex.style = CS_HREDRAW | CS_VREDRAW;
564557 wcex.lpfnWndProc = WindowProc;
@@ -638,19 +631,6 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
638631 {
639632 case WM_CREATE :
640633 {
641- // memset(¬ifyIconData, 0, sizeof(NOTIFYICONDATA));
642- // ZeroMemory(¬ifyIconData, sizeof(notifyIconData));
643- // notifyIconData.cbSize = sizeof(notifyIconData);
644- // notifyIconData.hWnd = hwnd;
645- // notifyIconData.uID = ID_TRAY_APP_ICON;
646- // notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
647- // notifyIconData.uCallbackMessage = WM_NOTIFYICON;
648- // notifyIconData.hIcon = (HICON)LoadImage(hCurrentInstance, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
649- // strncpy(notifyIconData.szTip, szProgramName, sizeof(szProgramName));
650- // LoadString(hCurrentInstance, szProgramName, notifyIconData.szTip, ARRAYSIZE(notifyIconData.szTip));
651- // Shell_NotifyIcon(NIM_ADD, ¬ifyIconData);
652-
653-
654634 NOTIFYICONDATA notifyIconData = { sizeof (notifyIconData) };
655635 notifyIconData.hWnd = hwnd;
656636 // Add the icon, setting the icon, tooltip, and callback message
@@ -667,7 +647,6 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
667647
668648 // NOTIFYICON_VERSION_4 is prefered
669649 notifyIconData.uVersion = NOTIFYICON_VERSION_4 ;
670- // return Shell_NotifyIcon(NIM_SETVERSION, ¬ifyIconData);
671650 Shell_NotifyIcon (NIM_SETVERSION , ¬ifyIconData);
672651
673652 hMenu = CreatePopupMenu ();
0 commit comments