home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / os2 / timeserv / clock.h < prev    next >
Text File  |  1999-05-11  |  4KB  |  141 lines

  1. /*static char *SCCSID = "@(#)clock.h    6.3 92/02/18";*/
  2. /**************************************************************************\
  3. *                                                                          *
  4. *       MODULE:     clock.h                                                *
  5. *                                                                          *
  6. *       COMMENT:    Global declarations                                    *
  7. *                                                                          *
  8. \**************************************************************************/
  9.  
  10.  
  11. #define HT_HOUR           1
  12. #define HT_MINUTE         2
  13. #define HT_HOUR_SHADE     3
  14. #define HT_MINUTE_SHADE   4
  15. #define HT_SECOND   5
  16.  
  17. #define DM_TIME         ( (USHORT)0x0001)
  18. #define DM_DATE         ( (USHORT)0x0002)
  19. #define DM_ANALOG       ( (USHORT)0x0010)
  20. #define DM_DIGITAL      ( (USHORT)0x0020)
  21. #define DM_SECONDHAND   ( (USHORT)0x0040)
  22.  
  23. #define MAXTITLELENGTH 256
  24. #define MESSAGELEN     80
  25.  
  26. #define SHADE               0
  27. #define LIGHT               1
  28. #define SURFACE             2
  29. #define BACKGROUND          3
  30.  
  31. #define DP_INSIDE           0
  32. #define DP_UNDER            1
  33. #define DP_LEFTDOWN         2
  34. #define DP_LEFTMIDDLE       3
  35.  
  36. #define DM_REDRAW           0
  37. #define DM_UPDATE           1
  38.  
  39. #define AM_ACTIVE           ( (USHORT) 0x0001)
  40. #define AM_AUDIO            ( (USHORT) 0x0002)
  41. #define AM_MSGBOX           ( (USHORT) 0x0004)
  42. #define TIMER_ASYNC         1
  43. #define TIMER_CONT          2
  44. #define SEM_TIMER_NAME      "\\sem32\\applnam.sem"
  45. #define NO_ERROR            (APIRET ) 0L
  46.  
  47. #define SEM_TIMER_VALUE     ( (ULONG) (1000L * 60 * 60) )
  48.  
  49. #define SZ_APPNAME  "ClockProgram 2.1"
  50. #define SZ_KEYNAME  "Preferences"
  51.  
  52. #define HELP
  53.  
  54. typedef struct _ALARMTIME
  55. {
  56.    UCHAR uchHour;
  57.    UCHAR uchMinutes;
  58.    USHORT usMode;
  59. } ALARMTIME;
  60.  
  61. typedef struct _TIMER_RESOURCES
  62. {
  63.      HEV     hTimerDev;
  64.      CHAR    *pszSemName;
  65.      ULONG   ulTimerValue;
  66.      HTIMER  hTimer;
  67. }TIMER_RESOURCES,*PTIMER_RESOURCES;
  68.  
  69.  
  70. typedef struct _CLOCKPREF
  71. {
  72.     USHORT usMajorTickPref;    /*0,1*/
  73.     USHORT usMinorTickPref;    /*2,3*/
  74.     LONG clrBackground;        /*4,5,6,7*/
  75.     LONG clrFace;              /*8,9,a,b*/
  76.     LONG clrHourHand;          /*c,d,e,f*/
  77.     LONG clrMinuteHand;        /*10,11,12,13*/
  78.     LONG clrDateOnAnalog;      /*14,15,16,17*/
  79.     BOOL fControlsHidden;      /*18,19*/
  80.     USHORT usDispMode;         /*1a,1b*/
  81.     ALARMTIME alarm ;          /*1c,1d,1e,1f*/
  82.     SWP swp;                   /*20....*/
  83.     SHORT sTimerType;
  84.  
  85. } CLOCKPREF;
  86.  
  87. typedef struct _INISAVERESTORE
  88. {
  89.     SWP    swp;
  90.     USHORT yRestore;
  91.     USHORT xRestore;
  92.     USHORT yMinRestore;
  93.     USHORT xMinRestore;
  94. } INISAVERESTORE;
  95. typedef struct _DATETIME FAR *LPDT;    /* For DosGet/SetDateTime     */
  96.  
  97.  
  98.  
  99.  
  100. /*--------------------------------------------------------------*\
  101.  *  Messagetable ids
  102. \*--------------------------------------------------------------*/
  103. #define IDMSG_INITFAILED                1
  104. #define IDMSG_MAINWINCREATEFAILED       2
  105. #define IDMSG_CANNOTOPENINPUTFILE       3
  106. #define IDMSG_CANNOTOPENOUTPUTFILE      4
  107. #define IDMSG_CANNOTRUNCOLOR            8
  108. #define IDMSG_CANNOTGETHPS              9
  109. #define IDMSG_HELPLOADERROR            10
  110. #define IDMSG_CANNOTLOADSTRING         11
  111. #define IDMSG_CANNOTOPENPRINTER        12
  112. #define IDMSG_HELPDISPLAYERROR         13
  113. #define IDMSG_CANNOTLOADEXITLIST       14
  114. #define IDMSG_PRINTINITFAILED          15
  115. #define IDMSG_OVERWRITEFILE            16
  116. #define IDMSG_PRINTERROR               17
  117. #define IDMSG_UNDOFAILED               18
  118. #define IDMSG_CANNOTGETFILEINFO        19
  119. #define IDMSG_CANNOTALLOCATEMEMORY     20
  120. #define IDMSG_CANNOTREADFILE           21
  121. #define IDMSG_CANNOTWRITETOFILE        22
  122. #define IDMSG_CANNOTLOADFONTS          23
  123. #define IDMSG_CANNOTGETPAGEINFO        24
  124.  
  125.  
  126.  
  127. /*--------------------------------------------------------------*\
  128.  *  Standard Dialog box ids
  129. \*--------------------------------------------------------------*/
  130. #define FILEOPEN        2000
  131. #define FILESAVE        2001
  132.  
  133. #define MSGBOXID        1001
  134. #define OBJECTID        1002
  135.  
  136.  
  137.  
  138. APIRET MessageBox( HWND hwndOwner,SHORT sIdMsg,
  139.                    SHORT fsStyle, BOOL fBeep );
  140. VOID InitHelp(VOID);
  141.