mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:33:10 +00:00
Select current time zone on the time zone property page.
svn path=/trunk/; revision=11597
This commit is contained in:
parent
d63d756d2c
commit
2f3caac348
1 changed files with 31 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: timedate.c,v 1.2 2004/11/07 16:03:51 ekohl Exp $
|
/* $Id: timedate.c,v 1.3 2004/11/08 10:33:08 ekohl Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS Timedate Control Panel
|
* PROJECT: ReactOS Timedate Control Panel
|
||||||
* FILE: lib/cpl/timedate/timedate.c
|
* FILE: lib/cpl/timedate/timedate.c
|
||||||
|
@ -90,6 +90,25 @@ DateTimePageProc(HWND hwndDlg,
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_TIMEZONE, WM_SETTEXT, 0, (LPARAM)TimeZoneInfo.StandardName);
|
SendDlgItemMessageW(hwndDlg, IDC_TIMEZONE, WM_SETTEXT, 0, (LPARAM)TimeZoneInfo.StandardName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_NOTIFY:
|
||||||
|
{
|
||||||
|
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||||
|
|
||||||
|
switch (lpnm->code)
|
||||||
|
{
|
||||||
|
case DTN_DATETIMECHANGE:
|
||||||
|
case MCN_SELECT:
|
||||||
|
/* Enable the 'Apply' button */
|
||||||
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -298,8 +317,15 @@ DestroyTimeZoneList(VOID)
|
||||||
static VOID
|
static VOID
|
||||||
ShowTimeZoneList(HWND hwnd)
|
ShowTimeZoneList(HWND hwnd)
|
||||||
{
|
{
|
||||||
|
TIME_ZONE_INFORMATION TimeZoneInfo;
|
||||||
PTIMEZONE_ENTRY Entry;
|
PTIMEZONE_ENTRY Entry;
|
||||||
|
DWORD dwIndex;
|
||||||
|
DWORD i;
|
||||||
|
|
||||||
|
GetTimeZoneInformation(&TimeZoneInfo);
|
||||||
|
|
||||||
|
dwIndex = 0;
|
||||||
|
i = 0;
|
||||||
Entry = TimeZoneListHead;
|
Entry = TimeZoneListHead;
|
||||||
while (Entry != NULL)
|
while (Entry != NULL)
|
||||||
{
|
{
|
||||||
|
@ -308,13 +334,16 @@ ShowTimeZoneList(HWND hwnd)
|
||||||
0,
|
0,
|
||||||
(LPARAM)Entry->Description);
|
(LPARAM)Entry->Description);
|
||||||
|
|
||||||
|
if (!wcscmp(Entry->StandardName, TimeZoneInfo.StandardName))
|
||||||
|
dwIndex = i;
|
||||||
|
|
||||||
|
i++;
|
||||||
Entry = Entry->Next;
|
Entry = Entry->Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendMessageW(hwnd,
|
SendMessageW(hwnd,
|
||||||
CB_SETCURSEL,
|
CB_SETCURSEL,
|
||||||
(WPARAM)0, // index
|
(WPARAM)dwIndex,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue