2004-10-30 19:16:20 +00:00
|
|
|
#ifndef __CPL_SAMPLE_H
|
|
|
|
#define __CPL_SAMPLE_H
|
|
|
|
|
2006-03-01 21:44:17 +00:00
|
|
|
#include <windows.h>
|
2006-03-07 20:59:11 +00:00
|
|
|
#include <windowsx.h>
|
|
|
|
#include <tchar.h>
|
|
|
|
#include <stdio.h>
|
2006-03-01 21:44:17 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <commctrl.h>
|
|
|
|
#include <cpl.h>
|
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
2006-06-22 17:13:29 +00:00
|
|
|
#define MAX_KEY_LENGTH 255
|
|
|
|
#define MAX_VALUE_NAME 16383
|
2006-03-01 21:44:17 +00:00
|
|
|
#define SERVERLISTSIZE 6
|
|
|
|
#define BUFSIZE 1024
|
2006-06-22 17:13:29 +00:00
|
|
|
#define NTPPORT 123
|
2006-03-01 21:44:17 +00:00
|
|
|
#define ID_TIMER 1
|
|
|
|
|
2004-10-30 19:16:20 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2006-06-22 17:13:29 +00:00
|
|
|
UINT idIcon;
|
|
|
|
UINT idName;
|
|
|
|
UINT idDescription;
|
2004-10-30 19:16:20 +00:00
|
|
|
APPLET_PROC AppletProc;
|
|
|
|
} APPLET, *PAPPLET;
|
|
|
|
|
|
|
|
extern HINSTANCE hApplet;
|
|
|
|
|
2006-06-22 17:13:29 +00:00
|
|
|
|
|
|
|
/* dateandtime.c */
|
|
|
|
INT_PTR CALLBACK DateTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
|
|
|
|
/* timezone.c */
|
|
|
|
INT_PTR CALLBACK TimeZonePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
|
|
|
|
/* internettime.c */
|
|
|
|
INT_PTR CALLBACK InetTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
|
2006-06-21 19:57:58 +00:00
|
|
|
/* timedate.c */
|
2006-10-03 17:02:36 +00:00
|
|
|
#if DBG
|
|
|
|
VOID DisplayWin32ErrorDbg(DWORD dwErrorCode, const char *file, int line);
|
|
|
|
#define DisplayWin32Error(e) DisplayWin32ErrorDbg(e, __FILE__, __LINE__);
|
|
|
|
#else
|
|
|
|
VOID DisplayWin32Error(DWORD dwErrorCode);
|
|
|
|
#endif
|
2006-03-01 21:44:17 +00:00
|
|
|
|
2006-06-22 17:13:29 +00:00
|
|
|
|
2006-06-21 19:57:58 +00:00
|
|
|
/* clock.c */
|
|
|
|
BOOL RegisterClockControl(VOID);
|
|
|
|
VOID UnregisterClockControl(VOID);
|
|
|
|
|
2006-06-22 17:13:29 +00:00
|
|
|
|
2006-06-21 19:57:58 +00:00
|
|
|
/* ntpclient.c */
|
2006-10-03 17:02:36 +00:00
|
|
|
BOOL InitializeConnection(CHAR *szIpAddr);
|
2006-03-01 21:44:17 +00:00
|
|
|
VOID DestroyConnection(VOID);
|
|
|
|
BOOL SendData(VOID);
|
2006-06-22 17:13:29 +00:00
|
|
|
ULONG RecieveData(VOID);
|
|
|
|
|
2006-03-01 21:44:17 +00:00
|
|
|
|
2006-03-07 20:59:11 +00:00
|
|
|
/* monthcal.c */
|
|
|
|
#define MCCM_SETDATE (WM_USER + 1)
|
|
|
|
#define MCCM_GETDATE (WM_USER + 2)
|
|
|
|
#define MCCM_RESET (WM_USER + 3)
|
|
|
|
#define MCCM_CHANGED (WM_USER + 4)
|
|
|
|
|
|
|
|
#define MCCN_SELCHANGE (1)
|
|
|
|
typedef struct _NMMCCSELCHANGE
|
|
|
|
{
|
|
|
|
NMHDR hdr;
|
|
|
|
WORD OldDay;
|
|
|
|
WORD OldMonth;
|
|
|
|
WORD OldYear;
|
|
|
|
WORD NewDay;
|
|
|
|
WORD NewMonth;
|
|
|
|
WORD NewYear;
|
|
|
|
} NMMCCSELCHANGE, *PNMMCCSELCHANGE;
|
|
|
|
#define MCCN_AUTOUPDATE (2)
|
|
|
|
typedef struct _NMMCCAUTOUPDATE
|
|
|
|
{
|
|
|
|
NMHDR hdr;
|
|
|
|
SYSTEMTIME SystemTime;
|
|
|
|
} NMMCCAUTOUPDATE, *PNMMCCAUTOUPDATE;
|
|
|
|
|
|
|
|
BOOL RegisterMonthCalControl(IN HINSTANCE hInstance);
|
|
|
|
VOID UnregisterMonthCalControl(IN HINSTANCE hInstance);
|
|
|
|
|
2004-10-30 19:16:20 +00:00
|
|
|
#endif /* __CPL_SAMPLE_H */
|
|
|
|
|
|
|
|
/* EOF */
|