Commit e15dff74 authored by Alex Priem's avatar Alex Priem Committed by Alexandre Julliard

- Implementation of WM_SETFORMAT

- Reworked drawing/selection - Implementation of WM_KEYDOWN
parent c956f67f
......@@ -34,7 +34,7 @@ DEFAULT_DEBUG_CHANNEL(monthcal)
* we want full month-names, and abbreviated weekdays, so these are
* defined here */
static const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
const int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
const char * const monthtxt[] = {"January", "February", "March", "April", "May",
"June", "July", "August", "September", "October",
......
......@@ -20,25 +20,61 @@ typedef struct tagDATETIME_INFO
HWND hwndCheckbut;
RECT rect;
RECT checkbox;
RECT daytxt;
RECT daynumtxt;
RECT rmonthtxt;
RECT yeartxt;
RECT calbutton;
int select;
HFONT hFont;
int nrFieldsAllocated;
int nrFields;
int haveFocus;
int *fieldspec;
RECT *fieldRect;
int *buflen;
char textbuf[256];
} DATETIME_INFO, *LPDATETIME_INFO;
extern VOID DATETIME_Register (VOID);
extern VOID DATETIME_Unregister (VOID);
/* this list of defines is closely related to `allowedformatchars' defined
* in datetime.c; the high nibble indicates the `base type' of the format
* specifier.
* Do not change without first reading DATETIME_UseFormat.
*
*/
#define DT_END_FORMAT 0
#define ONEDIGITDAY 0x01
#define TWODIGITDAY 0x02
#define THREECHARDAY 0x03
#define FULLDAY 0x04
#define ONEDIGIT12HOUR 0x11
#define TWODIGIT12HOUR 0x12
#define ONEDIGIT24HOUR 0x21
#define TWODIGIT24HOUR 0x22
#define ONEDIGITMINUTE 0x31
#define TWODIGITMINUTE 0x32
#define ONEDIGITMONTH 0x41
#define TWODIGITMONTH 0x42
#define THREECHARMONTH 0x43
#define FULLMONTH 0x44
#define ONEDIGITSECOND 0x51
#define TWODIGITSECOND 0x52
#define ONELETTERAMPM 0x61
#define TWOLETTERAMPM 0x62
#define ONEDIGITYEAR 0x71
#define TWODIGITYEAR 0x72
#define FULLYEAR 0x73
#define FORMATCALLBACK 0x81 /* -> maximum of 0x80 callbacks possible */
#define FORMATCALLMASK 0x80
#define DT_STRING 0x0100
#define DTHT_DATEFIELD 0xff /* for hit-testing */
#define DTHT_NONE 0
#define DTHT_MCPOPUP 1
#define DTHT_YEAR 2
#define DTHT_DAYNUM 3
#define DTHT_MONTH 4
#define DTHT_DAY 5
#define DTHT_CHECKBOX 6
#define DTHT_GOTFOCUS 128
#define DTHT_CHECKBOX 0x200 /* these should end at '00' , to make */
#define DTHT_MCPOPUP 0x300 /* & DTHT_DATEFIELD 0 when DATETIME_KeyDown */
#define DTHT_GOTFOCUS 0x400 /* tests for date-fields */
#endif /* __WINE_DATETIME_H */
......@@ -76,6 +76,7 @@ typedef struct tagMONTHCAL_INFO
extern void MONTHCAL_CopyTime (const SYSTEMTIME *from, SYSTEMTIME *to);
extern int MONTHCAL_CalculateDayOfWeek (DWORD day, DWORD month, DWORD year);
extern const int mdays[];
extern const char * const daytxt[];
extern const char * const monthtxt[];
extern void MONTHCAL_Register (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment