Annotation of mstools/samples/ddeml/clock/clock.h, revision 1.1.1.2

1.1       root        1: /****************************************************************************/
                      2: /*                                                                         */
                      3: /*  CLOCK.H -                                                              */
                      4: /*                                                                         */
                      5: /*     Windows Clock Include File                                          */
                      6: /*                                                                         */
                      7: /****************************************************************************/
                      8: 
                      9: /*--------------------------------------------------------------------------*/
                     10: /*  Typedefs and Structures                                                */
                     11: /*--------------------------------------------------------------------------*/
                     12: 
                     13: /* Don't change without updating GETTIME.ASM. */
                     14: typedef struct tagTIME
                     15:   {
                     16:     INT     hour;   /* 0 - 11 hours for analog clock */
                     17:     INT     hour12; /* 12 hour format */
                     18:     INT     hour24; /* 24 hour format */
                     19:     INT     minute;
                     20:     INT     second;
                     21:     INT     ampm;   /* 0 - AM , 1 - PM */
                     22:   } TIME;
                     23: 
                     24: typedef struct
                     25: {
                     26:     SHORT sin;
                     27:     SHORT cos;
                     28: } TRIG;
                     29: 
                     30: typedef struct tagCLOCKDISPSTRUCT
                     31:   {
                     32:     /* Clock display format for main window/icon outut */
                     33:     /* either  IDM_ANALOG, or IDM_DIGITAL */
                     34:     WORD    wFormat;
                     35: 
                     36:     /* X and Y offset within client area of window
                     37:      * or icon where digital clock will be displayed */
                     38:     POINT   line1;
                     39: 
                     40:     /* Y offset within icon area to second line where
                     41:      * minute will be displayed */
                     42:     INT     yline2;
                     43: 
                     44:     /* length of the digital clock readout string,
                     45:      * required by the text out function.
                     46:      * if the time format is 24 hour, this value is
                     47:      * set so that the AM/PM indicator is not output */
                     48:     WORD    wDigTimeLen;
                     49: 
                     50:     /* buffer to store digital time in.  the hour/minute/ampm
                     51:      * sections of this buffer are only modified if they
                     52:      * change from the previous call. */
                     53:     CHAR    szDigTime[20];
                     54: 
                     55:     /* buffer to hold the win.ini international indicators
                     56:      * for 1159, and 2359 AM/PM 12 hour time format.
                     57:      * szAMPM[0] holds AM, szAMPM[1] holds PM indicator */
                     58:     CHAR    szAMPM[2][7];
                     59: 
                     60:     /* intl time format (like DOS) 0 - 12 hour, 1 - 24 hour */
                     61:     WORD    wTimeFormat;
                     62: 
                     63:     /* intl time seperator character */
                     64:     CHAR    cTimeSep;
                     65:   } CLOCKDISPSTRUCT;
                     66: 
                     67: 
                     68: /*--------------------------------------------------------------------------*/
                     69: /*  Function Templates                                                     */
                     70: /*--------------------------------------------------------------------------*/
                     71: 
                     72: void NEAR GetTime(TIME *);
                     73: void NEAR ConvTime(TIME *);
                     74: 
                     75: LONG APIENTRY ClockWndProc(HWND, UINT, WPARAM, LONG);
                     76: 
                     77: 
                     78: /*--------------------------------------------------------------------------*/
                     79: /*  Constants                                                              */
                     80: /*--------------------------------------------------------------------------*/
                     81: 
1.1.1.2 ! root       82: #define IDD_ABOUT 400
        !            83: 
1.1       root       84:     /* Main Menu ID defines */
                     85: 
                     86: #define IDM_ANALOG      1
                     87: #define IDM_DIGITAL     2
                     88: #define IDM_ABOUT       4
                     89: 
                     90: /* Temp ID for dialogs. */
                     91: #define ID_JUNK     0xCACC
                     92: 
                     93:     /* String Resource definitions */
                     94: 
                     95: #define IDS_APPNAME     1
                     96: #define IDS_DATA        2
                     97: #define IDS_TOOMANY      3
                     98: #define IDS_FONTFILE     4
                     99: 
                    100: #define IDS_INTL       16
                    101: #define IDS_ITIME      18
                    102: #define IDS_S1159      19
                    103: #define IDS_S2359      20
                    104: #define IDS_STIME      22
                    105: #define IDS_CLKFORMAT  23
                    106: 
                    107: #define IDS_1159       24
                    108: #define IDS_2359       25
                    109: #define IDS_TIMESEP            27
                    110: #define IDS_USNAME      29
                    111: #define IDS_INIFILE     30
                    112: 
                    113: #define HOURSCALE       65
                    114: #define MINUTESCALE     80
                    115: #define HHAND           TRUE
                    116: #define MHAND           FALSE
                    117: #define SECONDSCALE     80
                    118: #define MAXBLOBWIDTH    25
                    119: #define BUFLEN          30
                    120: #define REPAINT         0
                    121: #define HANDPAINT       1
                    122: 
                    123: #define UPDATE                 0
                    124: #define REDRAW                 1
                    125: 
                    126: #define OPEN_TLEN              450
                    127: #define ICON_TLEN              45000
                    128: 
                    129: #define CLKSCALE                ((INT)8000)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.