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

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: 
        !            82:     /* Main Menu ID defines */
        !            83: 
        !            84: #define IDM_ANALOG      1
        !            85: #define IDM_DIGITAL     2
        !            86: #define IDM_ABOUT       4
        !            87: 
        !            88: /* Temp ID for dialogs. */
        !            89: #define ID_JUNK     0xCACC
        !            90: 
        !            91:     /* String Resource definitions */
        !            92: 
        !            93: #define IDS_APPNAME     1
        !            94: #define IDS_DATA        2
        !            95: #define IDS_TOOMANY      3
        !            96: #define IDS_FONTFILE     4
        !            97: 
        !            98: #define IDS_INTL       16
        !            99: #define IDS_ITIME      18
        !           100: #define IDS_S1159      19
        !           101: #define IDS_S2359      20
        !           102: #define IDS_STIME      22
        !           103: #define IDS_CLKFORMAT  23
        !           104: 
        !           105: #define IDS_1159       24
        !           106: #define IDS_2359       25
        !           107: #define IDS_TIMESEP            27
        !           108: #define IDS_USNAME      29
        !           109: #define IDS_INIFILE     30
        !           110: 
        !           111: #define HOURSCALE       65
        !           112: #define MINUTESCALE     80
        !           113: #define HHAND           TRUE
        !           114: #define MHAND           FALSE
        !           115: #define SECONDSCALE     80
        !           116: #define MAXBLOBWIDTH    25
        !           117: #define BUFLEN          30
        !           118: #define REPAINT         0
        !           119: #define HANDPAINT       1
        !           120: 
        !           121: #define UPDATE                 0
        !           122: #define REDRAW                 1
        !           123: 
        !           124: #define OPEN_TLEN              450
        !           125: #define ICON_TLEN              45000
        !           126: 
        !           127: #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.