1 #ifndef _TIMEDATE_H 2 #define _TIMEDATE_H 3 4 #include <stdarg.h> 5 6 #define _INC_WINDOWS 7 #define COM_NO_WINDOWS_H 8 #define WIN32_NO_STATUS 9 10 #include <windef.h> 11 #include <winbase.h> 12 #include <winnls.h> 13 #include <winreg.h> 14 #include <wingdi.h> 15 #include <winuser.h> 16 #include <wchar.h> 17 #include <commctrl.h> 18 #include <cpl.h> 19 #include <debug.h> 20 #include <strsafe.h> 21 22 #include "resource.h" 23 24 #define MAX_KEY_LENGTH 255 25 #define MAX_VALUE_NAME 16383 26 #define SERVERLISTSIZE 6 27 #define BUFSIZE 1024 28 #define ID_TIMER 1 29 30 typedef struct 31 { 32 UINT idIcon; 33 UINT idName; 34 UINT idDescription; 35 APPLET_PROC AppletProc; 36 } APPLET, *PAPPLET; 37 38 typedef struct 39 { 40 WCHAR szSyncSuc[BUFSIZE]; 41 WCHAR szSyncWait[BUFSIZE]; 42 WCHAR szSyncErr[BUFSIZE]; 43 WCHAR szSyncType[BUFSIZE]; 44 WCHAR szSyncInit[BUFSIZE]; 45 } SYNC_STATUS, *PSYNC_STATUS; 46 47 extern HINSTANCE hApplet; 48 49 50 /* dateandtime.c */ 51 INT_PTR CALLBACK DateTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 52 BOOL SystemSetLocalTime(LPSYSTEMTIME lpSystemTime); 53 54 55 /* timezone.c */ 56 INT_PTR CALLBACK TimeZonePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 57 58 59 /* internettime.c */ 60 INT_PTR CALLBACK InetTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 61 62 63 /* timedate.c */ 64 #if DBG 65 VOID DisplayWin32ErrorDbg(DWORD dwErrorCode, const char *file, int line); 66 #define DisplayWin32Error(e) DisplayWin32ErrorDbg(e, __FILE__, __LINE__); 67 #else 68 VOID DisplayWin32Error(DWORD dwErrorCode); 69 #endif 70 71 72 /* clock.c */ 73 #define CLM_STOPCLOCK (WM_USER + 1) 74 #define CLM_STARTCLOCK (WM_USER + 2) 75 76 BOOL RegisterClockControl(VOID); 77 VOID UnregisterClockControl(VOID); 78 79 80 /* monthcal.c */ 81 #define MCCM_SETDATE (WM_USER + 1) 82 #define MCCM_GETDATE (WM_USER + 2) 83 #define MCCM_RESET (WM_USER + 3) 84 #define MCCM_CHANGED (WM_USER + 4) 85 86 #define MCCN_SELCHANGE (1) 87 typedef struct _NMMCCSELCHANGE 88 { 89 NMHDR hdr; 90 WORD OldDay; 91 WORD OldMonth; 92 WORD OldYear; 93 WORD NewDay; 94 WORD NewMonth; 95 WORD NewYear; 96 } NMMCCSELCHANGE, *PNMMCCSELCHANGE; 97 #define MCCN_AUTOUPDATE (2) 98 typedef struct _NMMCCAUTOUPDATE 99 { 100 NMHDR hdr; 101 SYSTEMTIME SystemTime; 102 } NMMCCAUTOUPDATE, *PNMMCCAUTOUPDATE; 103 104 BOOL RegisterMonthCalControl(IN HINSTANCE hInstance); 105 VOID UnregisterMonthCalControl(IN HINSTANCE hInstance); 106 107 #endif /* _TIMEDATE_H */ 108