Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afsapplib / ctl_date.h
blobba7e32da2880eaba53b210149d88bf9d939a414e
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_DATE_H
11 #define CTL_DATE_H
14 * DEFINITIONS ________________________________________________________________
18 #ifndef THIS_HINST
19 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
20 #endif
22 #ifndef limit
23 #define limit(_a,_x,_b) min( max( (_x), (_a) ), (_b) )
24 #endif
26 #ifndef inlimit
27 #define inlimit(_a,_x,_b) ( (((_x)>=(_a)) && ((_x)<=(_b))) ? TRUE : FALSE )
28 #endif
30 #ifndef cxRECT
31 #define cxRECT(_r) ((_r).right - (_r).left)
32 #endif
34 #ifndef cyRECT
35 #define cyRECT(_r) ((_r).bottom - (_r).top)
36 #endif
40 * PROTOTYPES _________________________________________________________________
44 BOOL RegisterDateClass (void);
46 #define DM_GETDATE (WM_USER+313) // SYSTEMTIME *pTime = lp;
47 #define DM_SETDATE (WM_USER+314) // SYSTEMTIME *pTime = lp;
49 #define DN_CHANGE 0x1005 // SYSTEMTIME *pTime = lp;
50 #define DN_UPDATE 0x1006 // SYSTEMTIME *pTime = lp;
53 * void DA_GetDate (HWND hDate, SYSTEMTIME *pDate)
54 * void DA_SetDate (HWND hDate, SYSTEMTIME *pDate)
57 #define DA_GetDate(_hdate,_pDate) \
58 SendMessage(_hdate,DM_GETDATE,(WPARAM)0,(LPARAM)_pDate)
59 #define DA_SetDate(_hdate,_pDate) \
60 SendMessage(_hdate,DM_SETDATE,(WPARAM)0,(LPARAM)_pDate)
63 #endif