Index: reactos/base/shell/explorer/settings.cpp =================================================================== --- reactos/base/shell/explorer/settings.cpp (revision 75228) +++ reactos/base/shell/explorer/settings.cpp (working copy) @@ -2,6 +2,7 @@ * ReactOS Explorer * * Copyright 2013 - Edijs Kolesnikovics + * Copyright 2017 - Katayama Hirofumi MZ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -47,7 +48,6 @@ TaskBarSettings.bShowClock = TRUE; TaskBarSettings.bAutoHide = FALSE; TaskBarSettings.bAlwaysOnTop = FALSE; - } VOID @@ -60,6 +60,12 @@ /* FIXME: Show Clock, AutoHide and Always on top are stored in the stuckrects2 key but are not written to it with a click on apply. How is this done instead? AutoHide writes something to HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\Components\0 figure out what and why */ + + /* May the Force be with you, */ + HWND hTrayWnd = FindWindowA("Shell_TrayWnd", NULL); + HWND hTrayNotifyWnd = FindWindowExA(hTrayWnd, NULL, "TrayNotifyWnd", NULL); + SendMessage(hTrayNotifyWnd, TNWM_SHOWCLOCK, + TaskBarSettings.bShowClock, TaskBarSettings.bShowSeconds); } BOOL Index: reactos/base/shell/explorer/trayntfy.cpp =================================================================== --- reactos/base/shell/explorer/trayntfy.cpp (revision 75228) +++ reactos/base/shell/explorer/trayntfy.cpp (working copy) @@ -2,6 +2,7 @@ * ReactOS Explorer * * Copyright 2006 - 2007 Thomas Weidenmueller + * Copyright 2017 Katayama Hirofumi MZ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1547,10 +1548,19 @@ { BOOL PrevHidden = HideClock; HideClock = (wParam == 0); + BOOL PrevSeconds = TaskBarSettings.bShowSeconds; + TaskBarSettings.bShowSeconds = (lParam != 0); - if (m_clock != NULL && PrevHidden != HideClock) + if (m_clock != NULL && + (PrevHidden != HideClock || + PrevSeconds != TaskBarSettings.bShowSeconds)) { m_clock->ShowWindow(HideClock ? SW_HIDE : SW_SHOW); + + RECT rect; + GetClientRect(&rect); + SIZE sizClient = { rect.right, rect.bottom }; + Size(&sizClient); } return (LRESULT) (!PrevHidden);