source: trunk/include/win/monthcal.h@ 1036

Last change on this file since 1036 was 499, checked in by achimha, 26 years ago

headers for comctl32 updates

File size: 4.0 KB
Line 
1/* $Id: monthcal.h,v 1.2 1999-08-14 17:23:24 achimha Exp $ */
2
3/*
4 * Month calendar class extra info
5 *
6 * Copyright 1998 Eric Kohl
7 * Copyright 1999 Alex Priem
8 */
9
10#ifndef __WINE_MONTHCAL_H
11#define __WINE_MONTHCAL_H
12
13#define MC_SEL_LBUTUP 0 /* Left button released */
14#define MC_SEL_LBUTDOWN 1 /* Left button pressed in calendar */
15#define MC_PREVPRESSED 1 /* Prev month button pressed */
16#define MC_NEXTPRESSED 2 /* Next month button pressed */
17#define MC_NEXTMONTHDELAY 500 /* when continuously pressing `next */
18 /* month', wait 500 ms before going */
19 /* to the next month */
20#define MC_NEXTMONTHTIMER 1 /* Timer ID's */
21#define MC_PREVMONTHTIMER 2
22
23typedef struct tagMONTHCAL_INFO
24{
25 COLORREF bk;
26 COLORREF txt;
27 COLORREF titlebk;
28 COLORREF titletxt;
29 COLORREF monthbk;
30 COLORREF trailingtxt;
31 HFONT hFont;
32 HFONT hBoldFont;
33 int textHeight;
34 int textWidth;
35 int firstDayplace; /* place of the first day of the current month */
36 int delta; /* scroll rate; # of months that the */
37 /* control moves when user clicks a scroll button */
38 int visible; /* # of months visible */
39 int firstDay; /* Start month calendar with firstDay's day */
40 int monthRange;
41 MONTHDAYSTATE *monthdayState;
42 SYSTEMTIME todaysDate;
43 DWORD currentMonth;
44 DWORD currentYear;
45 int status; /* See MC_SEL flags */
46 int curSelDay; /* current selected day */
47 int firstSelDay; /* first selected day */
48 int maxSelCount;
49 SYSTEMTIME minSel;
50 SYSTEMTIME maxSel;
51 DWORD rangeValid;
52 SYSTEMTIME minDate;
53 SYSTEMTIME maxDate;
54
55 RECT rcClient; /* rect for whole client area */
56 RECT title; /* rect for the header above the calendar */
57 RECT titlebtnnext; /* the `next month' button in the header */
58 RECT titlebtnprev; /* the `prev month' button in the header */
59 RECT titlemonth; /* the `month name' txt in the header */
60 RECT titleyear; /* the `year number' txt in the header */
61 RECT prevmonth; /* day numbers of the previous month */
62 RECT nextmonth; /* day numbers of the next month */
63 RECT days; /* week numbers at left side */
64 RECT weeknums; /* week numbers at left side */
65 RECT today; /* `today: xx/xx/xx' text rect */
66} MONTHCAL_INFO, *LPMONTHCAL_INFO;
67/*
68int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
69
70char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
71 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL};
72
73char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
74 "Thursday", "Friday", "Saturday", NULL};
75
76char *monthtxt[] = {"January", "February", "March", "April", "May",
77 "June", "July", "August", "September", "October",
78 "November", "December"};
79
80char *daytxt[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
81int DayOfWeekTable[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
82*/
83extern void MONTHCAL_CopyTime (const SYSTEMTIME *from, SYSTEMTIME *to);
84extern int MONTHCAL_CalculateDayOfWeek (DWORD day, DWORD month, DWORD year);
85
86extern VOID MONTHCAL_Register (VOID);
87extern VOID MONTHCAL_Unregister (VOID);
88
89#endif /* __WINE_MONTHCAL_H */
Note: See TracBrowser for help on using the repository browser.