Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1994-1998, Microsoft Corporation All rights reserved.
  3. Module Name:
  4. timedate.h
  5. Abstract:
  6. This module contains the header information for the Date/Time applet.
  7. Revision History:
  8. --*/
  9. #ifndef STRICT
  10. #define STRICT
  11. #endif
  12. //
  13. // Include Files.
  14. //
  15. #include <windows.h>
  16. #include <windowsx.h>
  17. #include <commctrl.h>
  18. #include <comctrlp.h>
  19. #include <shlwapi.h>
  20. #include <strsafe.h>
  21. //
  22. // Constant Declarations.
  23. //
  24. #define CharSizeOf(x) (sizeof(x) / sizeof(x[0]))
  25. //
  26. // Index into wDateTime.
  27. //
  28. #define HOUR 0
  29. #define MINUTE 1
  30. #define SECOND 2
  31. #define MONTH 3
  32. #define DAY 4
  33. #define YEAR 5
  34. #define WEEKDAY 6
  35. //
  36. // Typedef Declarations.
  37. //
  38. #define TIMESUF_LEN 9 // time suffix length + null terminator
  39. typedef struct
  40. {
  41. TCHAR sCountry[24]; // country name
  42. int iCountry; // country code (phone ID)
  43. int iDate; // date mode (0: MDY, 1: DMY, 2: YMD)
  44. int iTime; // time mode (0: 12 hour clock, 1: 24 hour clock)
  45. int iTLZero; // leading zeros for hour (0: no, 1: yes)
  46. int iCurFmt; // currency mode (0: prefix, no separation
  47. // 1: suffix, no separation
  48. // 2: prefix, 1 char separation
  49. // 3: suffix, 1 char separation)
  50. int iCurDec; // currency decimal place
  51. int iNegCur; // negative currency pattern:
  52. // ($1.23), -$1.23, $-1.23, $1.23-, etc.
  53. int iLzero; // leading zeros of decimal (0: no, 1: yes)
  54. int iDigits; // significant decimal digits
  55. int iMeasure; // 0: metric, 1: US
  56. TCHAR s1159[TIMESUF_LEN]; // trailing string from 0:00 to 11:59
  57. TCHAR s2359[TIMESUF_LEN]; // trailing string from 12:00 to 23:59
  58. TCHAR sCurrency[6]; // currency symbol string
  59. TCHAR sThousand[4]; // thousand separator string
  60. TCHAR sDecimal[4]; // decimal separator string
  61. TCHAR sDateSep[4]; // date separator string
  62. TCHAR sTime[4]; // time separator string
  63. TCHAR sList[4]; // list separator string
  64. TCHAR sLongDate[80]; // long date picture string
  65. TCHAR sShortDate[80]; // short date picture string
  66. TCHAR sLanguage[4]; // language name
  67. short iDayLzero; // day leading zero for short date format
  68. short iMonLzero; // month leading zero for short date format
  69. short iCentury; // display full century in short date format
  70. short iLDate; // long date mode (0: MDY, 1: DMY, 2: YMD)
  71. LCID lcid; // locale id
  72. TCHAR sTimeFormat[80]; // time format picture string
  73. int iTimeMarker; // time marker position (0: suffix, 1: prefix)
  74. int iNegNumber; // negative number pattern:
  75. // (1.1), -1.1, - 1.1, 1.1-, 1.1 -
  76. TCHAR sMonThousand[4]; // monetary thousand separator string
  77. TCHAR sMonDecimal[4]; // monetary decimal separator string
  78. } INTLSTRUCT, *LPINTL;
  79. //
  80. // Global Variables.
  81. //
  82. extern short wDateTime[7]; // values for first 7 date/time items
  83. extern short wPrevDateTime[7]; // only repaint fields if necessary
  84. extern BOOL fDateDirty;
  85. EXTERN_C HINSTANCE g_hInst;
  86. extern INTLSTRUCT IntlDef;
  87. //
  88. // Function Prototypes.
  89. //
  90. void
  91. GetDateTime(void);
  92. void
  93. GetTime(void);
  94. void
  95. SetTime(void);
  96. void
  97. GetDate(void);
  98. void
  99. SetDate(void);
  100. #ifndef ARRAYSIZE
  101. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  102. #endif