Source code of Windows XP (NT5)
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.

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