mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 21:21:33 +00:00
hide clock from desktop bar if it's configured this way in registry
svn path=/trunk/; revision=8712
This commit is contained in:
parent
841b0b2958
commit
258d7cea79
3 changed files with 24 additions and 12 deletions
|
@ -30,8 +30,3 @@
|
|||
- Startmenu: You can't close the start menu with pressing Win-key You can open the start menu
|
||||
with pressing Win-key, but can't close with another hit of Win-key.
|
||||
|
||||
- > Despite of settings, the clock's always shown I set my Win-Explorer to hide the clock
|
||||
> shown in the taskbar, but the ROS-Exp ignores the setting and always shows the clock.
|
||||
Yes, ROS explorer doesn't read many settings from the registry currently,
|
||||
as it doesn't have a way to configure them. (missing configuration dialogs)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<tr>
|
||||
<td><address style="align: right;"><small>
|
||||
ROS Explorer Source Code Documentation
|
||||
<br>generated on 13.03.2004 by <a href="http://www.doxygen.org/index.html">
|
||||
<br>generated on 14.03.2004 by <a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
||||
</small></address>
|
||||
</td>
|
||||
|
|
|
@ -104,6 +104,19 @@ LRESULT NotifyArea::Init(LPCREATESTRUCT pcs)
|
|||
if (!g_Globals._SHRestricted || !SHRestricted(REST_HIDECLOCK))
|
||||
#endif
|
||||
{
|
||||
HKEY hkeyStuckRects = 0;
|
||||
DWORD buffer[10];
|
||||
DWORD len = sizeof(buffer);
|
||||
|
||||
bool hide_clock = false;
|
||||
|
||||
// check if the clock should be hidden
|
||||
if (!RegOpenKey(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects2"), &hkeyStuckRects) &&
|
||||
!RegQueryValueEx(hkeyStuckRects, TEXT("Settings"), 0, NULL, (LPBYTE)buffer, &len) &&
|
||||
len==sizeof(buffer) && buffer[0]==sizeof(buffer))
|
||||
hide_clock = buffer[2] & 0x08? true: false;
|
||||
|
||||
if (!hide_clock) {
|
||||
// create clock window
|
||||
_hwndClock = ClockWindow::Create(_hwnd);
|
||||
|
||||
|
@ -111,9 +124,13 @@ LRESULT NotifyArea::Init(LPCREATESTRUCT pcs)
|
|||
ClientRect clock_size(_hwndClock);
|
||||
_clock_width = clock_size.right;
|
||||
}
|
||||
}
|
||||
|
||||
if (hkeyStuckRects)
|
||||
RegCloseKey(hkeyStuckRects);
|
||||
}
|
||||
|
||||
SetTimer(_hwnd, 0, 1000, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue