Added 3D border around control. Fixed monthcal control popup. Added
[wine.git] / include / datetime.h
blob581e53510ffb59d6d7fbfcc33cc30ba4c2020373
1 /*
2 * Date and time picker class extra info
4 * Copyright 1998 Eric Kohl
5 * Copyright 1999 Alex Priem
6 */
8 #ifndef __WINE_DATETIME_H
9 #define __WINE_DATETIME_H
11 #include "windef.h"
12 #include "winbase.h"
14 typedef struct tagDATETIME_INFO
16 HWND hMonthCal;
17 HWND hUpdown;
18 SYSTEMTIME date;
19 BOOL dateValid;
20 HWND hwndCheckbut;
21 RECT rcClient; /* rect around the edge of the window */
22 RECT rcDraw; /* rect inside of the border */
23 RECT checkbox; /* checkbox allowing the control to be enabled/disabled */
24 RECT calbutton; /* button that toggles the dropdown of the monthcal control */
25 BOOL bCalDepressed; /* TRUE = cal button is depressed */
26 int select;
27 HFONT hFont;
28 int nrFieldsAllocated;
29 int nrFields;
30 int haveFocus;
31 int *fieldspec;
32 RECT *fieldRect;
33 int *buflen;
34 char textbuf[256];
35 POINT monthcal_pos;
36 } DATETIME_INFO, *LPDATETIME_INFO;
38 extern VOID DATETIME_Register (VOID);
39 extern VOID DATETIME_Unregister (VOID);
43 /* this list of defines is closely related to `allowedformatchars' defined
44 * in datetime.c; the high nibble indicates the `base type' of the format
45 * specifier.
46 * Do not change without first reading DATETIME_UseFormat.
50 #define DT_END_FORMAT 0
51 #define ONEDIGITDAY 0x01
52 #define TWODIGITDAY 0x02
53 #define THREECHARDAY 0x03
54 #define FULLDAY 0x04
55 #define ONEDIGIT12HOUR 0x11
56 #define TWODIGIT12HOUR 0x12
57 #define ONEDIGIT24HOUR 0x21
58 #define TWODIGIT24HOUR 0x22
59 #define ONEDIGITMINUTE 0x31
60 #define TWODIGITMINUTE 0x32
61 #define ONEDIGITMONTH 0x41
62 #define TWODIGITMONTH 0x42
63 #define THREECHARMONTH 0x43
64 #define FULLMONTH 0x44
65 #define ONEDIGITSECOND 0x51
66 #define TWODIGITSECOND 0x52
67 #define ONELETTERAMPM 0x61
68 #define TWOLETTERAMPM 0x62
69 #define ONEDIGITYEAR 0x71
70 #define TWODIGITYEAR 0x72
71 #define FULLYEAR 0x73
72 #define FORMATCALLBACK 0x81 /* -> maximum of 0x80 callbacks possible */
73 #define FORMATCALLMASK 0x80
74 #define DT_STRING 0x0100
76 #define DTHT_DATEFIELD 0xff /* for hit-testing */
78 #define DTHT_NONE 0
79 #define DTHT_CHECKBOX 0x200 /* these should end at '00' , to make */
80 #define DTHT_MCPOPUP 0x300 /* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
81 #define DTHT_GOTFOCUS 0x400 /* tests for date-fields */
83 #endif /* __WINE_DATETIME_H */