mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[EXPLORER_NEW]
- Open Date and Time Properties on double-click on the tray clock. Based on patch by Edijs Kolesnikovičs and Grégori Macário Harbs. CORE-6860 #resolve svn path=/trunk/; revision=58794
This commit is contained in:
parent
44de93b3cf
commit
2ab03b12af
3 changed files with 29 additions and 0 deletions
|
@ -424,6 +424,10 @@ TrayNotify_NotifyMsg(IN HWND hwnd,
|
|||
IN WPARAM wParam,
|
||||
IN LPARAM lParam);
|
||||
|
||||
BOOL
|
||||
TrayNotify_GetClockRect(IN HWND hwnd,
|
||||
OUT PRECT rcClock);
|
||||
|
||||
/*
|
||||
* taskswnd.c
|
||||
*/
|
||||
|
|
|
@ -1683,6 +1683,17 @@ TrayNotify_NotifyMsg(IN HWND hwnd,
|
|||
}
|
||||
}
|
||||
|
||||
BOOL
|
||||
TrayNotify_GetClockRect(IN HWND hwnd,
|
||||
OUT PRECT rcClock)
|
||||
{
|
||||
PTRAY_NOTIFY_WND_DATA This = (PTRAY_NOTIFY_WND_DATA)GetWindowLongPtr(hwnd, 0);
|
||||
if (!IsWindowVisible(This->hWndTrayClock))
|
||||
return FALSE;
|
||||
|
||||
return GetWindowRect(This->hWndTrayClock, rcClock);
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK
|
||||
TrayNotifyWndProc(IN HWND hwnd,
|
||||
IN UINT uMsg,
|
||||
|
|
|
@ -2494,9 +2494,23 @@ HandleTrayContextMenu:
|
|||
}
|
||||
|
||||
case WM_NCLBUTTONDBLCLK:
|
||||
{
|
||||
/* We "handle" this message so users can't cause a weird maximize/restore
|
||||
window animation when double-clicking the tray window! */
|
||||
|
||||
/* We should forward mouse messages to child windows here.
|
||||
Right now, this is only clock double-click */
|
||||
RECT rcClock;
|
||||
if (TrayNotify_GetClockRect(This->hwndTrayNotify, &rcClock))
|
||||
{
|
||||
POINT ptClick;
|
||||
ptClick.x = MAKEPOINTS(lParam).x;
|
||||
ptClick.y = MAKEPOINTS(lParam).y;
|
||||
if (PtInRect(&rcClock, ptClick))
|
||||
LaunchCPanel(NULL, TEXT("timedate.cpl"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_NCCREATE:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue