nt-makefile-clean-targets-20010917
[openafs.git] / src / WINNT / afsapplib / ctl_date.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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  */
9
10 #ifndef CTL_DATE_H
11 #define CTL_DATE_H
12
13 /*
14  * DEFINITIONS ________________________________________________________________
15  *
16  */
17
18 #ifndef THIS_HINST
19 #define THIS_HINST  (HINSTANCE)GetModuleHandle(NULL)
20 #endif
21
22 #ifndef limit
23 #define limit(_a,_x,_b)  min( max( (_x), (_a) ), (_b) )
24 #endif
25
26 #ifndef inlimit
27 #define inlimit(_a,_x,_b)  ( (((_x)>=(_a)) && ((_x)<=(_b))) ? TRUE : FALSE )
28 #endif
29
30 #ifndef cxRECT
31 #define cxRECT(_r)  ((_r).right - (_r).left)
32 #endif
33
34 #ifndef cyRECT
35 #define cyRECT(_r)  ((_r).bottom - (_r).top)
36 #endif
37
38
39 /*
40  * PROTOTYPES _________________________________________________________________
41  *
42  */
43
44 BOOL RegisterDateClass (void);
45
46 #define DM_GETDATE    (WM_USER+313) // SYSTEMTIME *pTime = lp;
47 #define DM_SETDATE    (WM_USER+314) // SYSTEMTIME *pTime = lp;
48
49 #define DN_CHANGE     0x1005  // SYSTEMTIME *pTime = lp;
50 #define DN_UPDATE     0x1006  // SYSTEMTIME *pTime = lp;
51
52 /*
53  * void DA_GetDate (HWND hDate, SYSTEMTIME *pDate)
54  * void DA_SetDate (HWND hDate, SYSTEMTIME *pDate)
55  *
56  */
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)
61
62
63 #endif
64