--- mstools/samples/ddeml/clock/clock.h 2018/08/09 18:21:23 1.1.1.2 +++ mstools/samples/ddeml/clock/clock.h 2018/08/09 18:23:20 1.1.1.3 @@ -1,13 +1,17 @@ -/****************************************************************************/ -/* */ -/* CLOCK.H - */ -/* */ -/* Windows Clock Include File */ -/* */ -/****************************************************************************/ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + /*--------------------------------------------------------------------------*/ -/* Typedefs and Structures */ +/* Typedefs and Structures */ /*--------------------------------------------------------------------------*/ /* Don't change without updating GETTIME.ASM. */ @@ -27,12 +31,89 @@ typedef struct SHORT cos; } TRIG; +TRIG CirTab[] = { // circle sin, cos, table + { 0, -7999 }, + { 836, -7956 }, + { 1663, -7825 }, + { 2472, -7608 }, + { 3253, -7308 }, + { 3999, -6928 }, + { 4702, -6472 }, + { 5353, -5945 }, + { 5945, -5353 }, + { 6472, -4702 }, + { 6928, -4000 }, + { 7308, -3253 }, + { 7608, -2472 }, + { 7825, -1663 }, + { 7956, -836 }, + + { 8000, 0 }, + { 7956, 836 }, + { 7825, 1663 }, + { 7608, 2472 }, + { 7308, 3253 }, + { 6928, 4000 }, + { 6472, 4702 }, + { 5945, 5353 }, + { 5353, 5945 }, + { 4702, 6472 }, + { 3999, 6928 }, + { 3253, 7308 }, + { 2472, 7608 }, + { 1663, 7825 }, + { 836, 7956 }, + + { 0, 7999 }, + { -836, 7956 }, + { -1663, 7825 }, + { -2472, 7608 }, + { -3253, 7308 }, + { -4000, 6928 }, + { -4702, 6472 }, + { -5353, 5945 }, + { -5945, 5353 }, + { -6472, 4702 }, + { -6928, 3999 }, + { -7308, 3253 }, + { -7608, 2472 }, + { -7825, 1663 }, + { -7956, 836 }, + + { -7999, -0 }, + { -7956, -836 }, + { -7825, -1663 }, + { -7608, -2472 }, + { -7308, -3253 }, + { -6928, -4000 }, + { -6472, -4702 }, + { -5945, -5353 }, + { -5353, -5945 }, + { -4702, -6472 }, + { -3999, -6928 }, + { -3253, -7308 }, + { -2472, -7608 }, + { -1663, -7825 }, + { -836 , -7956 } +}; + typedef struct tagCLOCKDISPSTRUCT { /* Clock display format for main window/icon outut */ /* either IDM_ANALOG, or IDM_DIGITAL */ WORD wFormat; + /* Various boolean settings for the clock style + * and current settings */ + BOOL bMinimized; + BOOL bMaximized; + BOOL bTopMost; + BOOL bNoTitle; + BOOL bTmpHide; + BOOL bIconic; + BOOL bColor; + BOOL bNewFont; + /* X and Y offset within client area of window * or icon where digital clock will be displayed */ POINT line1; @@ -66,7 +147,7 @@ typedef struct tagCLOCKDISPSTRUCT /*--------------------------------------------------------------------------*/ -/* Function Templates */ +/* Function Templates */ /*--------------------------------------------------------------------------*/ void NEAR GetTime(TIME *); @@ -76,39 +157,47 @@ LONG APIENTRY ClockWndProc(HWND, UINT, W /*--------------------------------------------------------------------------*/ -/* Constants */ +/* Constants */ /*--------------------------------------------------------------------------*/ #define IDD_ABOUT 400 /* Main Menu ID defines */ -#define IDM_ANALOG 1 -#define IDM_DIGITAL 2 -#define IDM_ABOUT 4 +#define IDM_ANALOG 1 +#define IDM_DIGITAL 2 +#define IDM_ABOUT 4 +//-------------- +#define IDM_TOPMOST 5 +#define IDM_NOTITLE 6 +//-------------- + /* Temp ID for dialogs. */ #define ID_JUNK 0xCACC /* String Resource definitions */ -#define IDS_APPNAME 1 -#define IDS_DATA 2 +#define IDS_APPNAME 1 +#define IDS_DATA 2 #define IDS_TOOMANY 3 #define IDS_FONTFILE 4 -#define IDS_INTL 16 -#define IDS_ITIME 18 -#define IDS_S1159 19 -#define IDS_S2359 20 -#define IDS_STIME 22 -#define IDS_CLKFORMAT 23 - -#define IDS_1159 24 -#define IDS_2359 25 -#define IDS_TIMESEP 27 +#define IDS_INTL 16 +#define IDS_ITIME 18 +#define IDS_S1159 19 +#define IDS_S2359 20 +#define IDS_STIME 22 +#define IDS_CLKFORMAT 23 + +#define IDS_1159 24 +#define IDS_2359 25 +#define IDS_TIMESEP 27 #define IDS_USNAME 29 #define IDS_INIFILE 30 +//-------------- +#define IDS_TOPMOST 31 +//-------------- #define HOURSCALE 65 #define MINUTESCALE 80 @@ -120,10 +209,10 @@ LONG APIENTRY ClockWndProc(HWND, UINT, W #define REPAINT 0 #define HANDPAINT 1 -#define UPDATE 0 -#define REDRAW 1 +#define UPDATE 0 +#define REDRAW 1 -#define OPEN_TLEN 450 -#define ICON_TLEN 45000 +#define OPEN_TLEN 450 +#define ICON_TLEN 45000 #define CLKSCALE ((INT)8000)