Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afsapplib / ctl_time.h
blobd50dabd9a6116f6f1a5a9d6537355aec82993490
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #ifndef CTL_TIME_H
11 #define CTL_TIME_H
14 * DEFINITIONS ________________________________________________________________
18 #ifndef THIS_HINST
19 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
20 #endif
22 #ifndef EXPORTED
23 #define EXPORTED
24 #endif
26 #ifndef limit
27 #define limit(_a,_x,_b) min( max( (_x), (_a) ), (_b) )
28 #endif
30 #ifndef inlimit
31 #define inlimit(_a,_x,_b) ( (((_x)>=(_a)) && ((_x)<=(_b))) ? TRUE : FALSE )
32 #endif
34 #ifndef cxRECT
35 #define cxRECT(_r) ((_r).right - (_r).left)
36 #endif
38 #ifndef cyRECT
39 #define cyRECT(_r) ((_r).bottom - (_r).top)
40 #endif
44 * PROTOTYPES _________________________________________________________________
49 EXPORTED BOOL RegisterTimeClass (void);
51 #define TM_GETTIME (WM_USER+311) // SYSTEMTIME *pTime = lp;
52 #define TM_SETTIME (WM_USER+312) // SYSTEMTIME *pTime = lp;
54 #define TN_CHANGE 0x1005 // SYSTEMTIME *pTime = lp;
55 #define TN_UPDATE 0x1006 // SYSTEMTIME *pTime = lp;
58 * void TI_GetTime (HWND hTime, SYSTEMTIME *pTime)
59 * void TI_SetTime (HWND hTime, SYSTEMTIME *pTime)
62 #define TI_GetTime(_htime,_pTime) \
63 SendMessage(_htime,TM_GETTIME,(WPARAM)0,(LPARAM)_pTime)
64 #define TI_SetTime(_htime,_pTime) \
65 SendMessage(_htime,TM_SETTIME,(WPARAM)0,(LPARAM)_pTime)
68 #endif