/*------------------------------------------------ ending process --------------------------------------------------*/ void EndClock(HWND hwnd) { static BOOL bEndClock = FALSE; if(bEndClock) return; // avoid to be called twice bEndClock = TRUE; g_bVisualStyle = IsXPVisualStyle(); #if TC_ENABLE_MOUSEDROP DragAcceptFiles(hwnd, FALSE); #endif #if TC_ENABLE_DESKTOPICON EndDesktopIcons(); // desktop.c #endif #if TC_ENABLE_SYSINFO EndSysInfo(hwnd); // sysinfo.c #endif #if TC_ENABLE_VOLUME ReleaseMixer(); // mixer.c #endif #if TC_ENABLE_TRAYNOTIFY EndTrayNotify(); // traynotify.c #endif #if TC_ENABLE_TASKSWITCH EndTaskSwitch(); // taskswitch.c #endif #if TC_ENABLE_TASKBAR EndTaskbar(hwnd); // taskbar.c #endif #if TC_ENABLE_STARTMENU EndStartMenu(); // startmenu.c #endif #if TC_ENABLE_STARTBUTTON EndStartButton(); // startbtn.c #endif ClearDrawing(); // drawing.c EndTooltip(hwnd); // tooltip.c EndNewAPI(); // newapi.c // Stop timers KillTimer(hwnd, IDTIMER_MAIN); // restore window procedure RemoveWindowSubclass(hwnd, SubclassProc, SUBCLASS_ID); if(g_winver&WIN10RS1) { RemoveWindowSubclass(GetParent(hwnd), SubclassTrayProc, SUBCLASSTRAY_ID); } #if TC_ENABLE_TASKBAR RefreshTaskbar(hwnd); // taskbar.c #else PostMessage(GetParent(GetParent(hwnd)), WM_SIZE, SIZE_RESTORED, 0); InvalidateRect(GetParent(GetParent(hwnd)), NULL, TRUE); #endif // close window of tclock.exe PostMessage(g_hwndTClockMain, WM_CLOSE, 0, 0); PostMessage(hwnd, WM_TIMER, 0, 0); }
/*------------------------------------------------ CLOCKM_REFRESHTOOLTIP message --------------------------------------------------*/ void OnRefreshTooltip(HWND hwnd) { EndTooltip(hwnd); InitTooltip(hwnd); }