92#define DT_END_FORMAT 0
93#define ONEDIGITDAY 0x01
94#define TWODIGITDAY 0x02
95#define THREECHARDAY 0x03
97#define ONEDIGIT12HOUR 0x11
98#define TWODIGIT12HOUR 0x12
99#define ONEDIGIT24HOUR 0x21
100#define TWODIGIT24HOUR 0x22
101#define ONEDIGITMINUTE 0x31
102#define TWODIGITMINUTE 0x32
103#define ONEDIGITMONTH 0x41
104#define TWODIGITMONTH 0x42
105#define THREECHARMONTH 0x43
106#define FULLMONTH 0x44
107#define ONEDIGITSECOND 0x51
108#define TWODIGITSECOND 0x52
109#define ONELETTERAMPM 0x61
110#define TWOLETTERAMPM 0x62
111#define ONEDIGITYEAR 0x71
112#define TWODIGITYEAR 0x72
113#define INVALIDFULLYEAR 0x73
115#define FORMATCALLBACK 0x81
116#define FORMATCALLMASK 0x80
117#define DT_STRING 0x0100
119#define DTHT_DATEFIELD 0xff
121#define DTHT_NONE 0x1000
122#define DTHT_CHECKBOX 0x2000
123#define DTHT_MCPOPUP 0x3000
124#define DTHT_GOTFOCUS 0x4000
125#define DTHT_NODATEMASK 0xf000
150 *systime = infoPtr->
date;
196 if (!systime)
return FALSE;
198 TRACE(
"%04d/%02d/%02d %02d:%02d:%02d\n",
203 if (systime->
wYear == 0 ||
207 systime->
wHour > 23 ||
219 infoPtr->
date = *systime;
261 for (
i = 0; formattxt[
i];
i++) {
262 TRACE (
"\n%d %c:",
i, formattxt[
i]);
263 if (!inside_literal) {
264 for (
j = 0;
j <
len;
j++) {
267 if ((*nrFields==0) && (infoPtr->
fieldspec[*nrFields]==0)) {
271 if (infoPtr->
fieldspec[*nrFields] >> 4 !=
j) {
289 if (formattxt[
i] ==
'\'')
291 inside_literal = !inside_literal;
297 if ((*nrFields==0) && (infoPtr->
fieldspec[*nrFields]==0)) {
299 infoPtr->
buflen[*nrFields] = 0;
303 infoPtr->
buflen[*nrFields] = 0;
307 infoPtr->
buflen[*nrFields]++;
311 FIXME (
"out of memory; should reallocate. crash ahead.\n");
317 if (infoPtr->
fieldspec[*nrFields] != 0) (*nrFields)++;
324 WCHAR format_buf[80];
386 if (txtlen > resultSize)
387 txtlen = resultSize - 1;
413 if (
date.wHour == 0) {
422 if (
date.wHour == 0) {
472 FIXME (
"Not implemented\n");
491static int wrap(
int val,
int delta,
int minVal,
int maxVal)
494 if (delta ==
INT_MIN ||
val < minVal)
return maxVal;
495 if (delta ==
INT_MAX ||
val > maxVal)
return minVal;
562 FIXME (
"Not implemented\n");
571 if (10000 *
date->wYear + 100 *
date->wMonth +
date->wDay < 17520914) {
586 int i = (
min ? 0 : 1);
681 for (
i = 0;
i < max_count;
i++)
738 field->left = prevright;
742 prevright =
field->right;
808 for(--
i;
i >= 0;
i--)
840 oldyear =
date.wYear;
846 date.wYear = oldyear;
851 oldyear =
date.wYear;
857 date.wYear = oldyear;
877 if (
date.wHour >= 12)
897 if (
val ==
'a' ||
val ==
'A') {
898 if (
date.wHour >= 12)
900 }
else if (
val ==
'p' ||
val ==
'P') {
945 if (
new == -1)
return 0;
982 TRACE(
"update calendar %04d/%02d/%02d\n",
983 lprgSysTimeArray->
wYear, lprgSysTimeArray->
wMonth, lprgSysTimeArray->
wDay);
993 TRACE (
"dt:%p mc:%p mc parent:%p, desktop:%p\n",
1062 infoPtr->
dwStyle &= ~WS_DISABLED;
1075 HBRUSH hBrush, hSolidBrush =
NULL;
1109 TRACE(
"got from calendar %04d/%02d/%02d day of week %d\n",
1118 TRACE(
"Delta pos %d\n", lpnmud->iDelta);
1133 if ((fieldNum==0) && (infoPtr->
select))
return 0;
1136 FIXME (
"Callbacks not implemented yet\n");
1172 if (
new != infoPtr->
select)
1184 if (
new != infoPtr->
select)
1198 int fieldNum, fieldSpec;
1201 fieldSpec = infoPtr->
fieldspec[fieldNum];
1208 }
else if (vkCode >=
'0' && vkCode <=
'9') {
1243 if ((fieldNum==0) && (infoPtr->
select))
return 0;
1263 TRACE(
"lost focus to %p\n", lostFocus);
1292 TRACE(
"got focus from %p\n", lostFocus);
1329 dtdtc.
st = infoPtr->
date;
1390 TRACE(
"(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
1408 TRACE(
"(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
1417 2, 2, 13, 13, infoPtr->
hwndSelf, 0,
1455 size->cy = field_size.
cy;
1504 if (!infoPtr)
return -1;
1522 0, 0, 0, 0, infoPtr->
hwndSelf, 0, 0, 0);
1560 if (!
dst || (
count <= 0))
return 0;
1580 for (
i = 0;
i <
info->nrFields;
i++)
1688 case WM_STYLECHANGING:
1691 case WM_STYLECHANGED:
1711 ERR(
"unknown msg %04x wp=%08lx lp=%08lx\n",
static const char * wine_dbgstr_point(const POINT *ppt)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second) DECLSPEC_HIDDEN
COMCTL32_SysColor comctl32_color
HWND WINAPI CreateUpDownControl(DWORD style, INT x, INT y, INT cx, INT cy, HWND parent, INT id, HINSTANCE inst, HWND buddy, INT maxVal, INT minVal, INT curVal)
static LRESULT DATETIME_Notify(DATETIME_INFO *infoPtr, const NMHDR *lpnmh)
static LRESULT DATETIME_Button_Command(DATETIME_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static const SYSTEMTIME max_allowed_date
static LRESULT DATETIME_Size(DATETIME_INFO *infoPtr, INT width, INT height)
static void DATETIME_UseFormat(DATETIME_INFO *infoPtr, LPCWSTR formattxt)
static LRESULT DATETIME_SetFocus(DATETIME_INFO *infoPtr, HWND lostFocus)
static INT DATETIME_HitTest(const DATETIME_INFO *infoPtr, POINT pt)
static int DATETIME_GetFieldWidth(const DATETIME_INFO *infoPtr, HDC hdc, int count)
static void DATETIME_IncreaseField(DATETIME_INFO *infoPtr, int number, int delta)
static LRESULT DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
static LRESULT DATETIME_Enable(DATETIME_INFO *infoPtr, BOOL bEnable)
struct DATETIME_INFO * LPDATETIME_INFO
static INT DATETIME_GetText(const DATETIME_INFO *infoPtr, INT count, LPWSTR dst)
static int DATETIME_GetPrevDateField(const DATETIME_INFO *infoPtr, int i)
static LRESULT DATETIME_Char(DATETIME_INFO *infoPtr, WPARAM vkCode)
static const int maxrepetition[]
static LRESULT DATETIME_LButtonUp(DATETIME_INFO *infoPtr)
static LRESULT DATETIME_KeyDown(DATETIME_INFO *infoPtr, DWORD vkCode)
static BOOL DATETIME_SetFormatA(DATETIME_INFO *infoPtr, LPCSTR lpszFormat)
static BOOL DATETIME_IsDateInValidRange(const DATETIME_INFO *infoPtr, const SYSTEMTIME *date)
static int DATETIME_GetTextLength(const DATETIME_INFO *info)
int MONTHCAL_MonthLength(int month, int year)
void DATETIME_Register(void)
static void DATETIME_ReturnTxt(const DATETIME_INFO *infoPtr, int count, LPWSTR result, int resultSize)
void DATETIME_Unregister(void)
static BOOL DATETIME_SendSimpleNotify(const DATETIME_INFO *infoPtr, UINT code)
static LRESULT DATETIME_VScroll(DATETIME_INFO *infoPtr, WORD wScroll)
static void DATETIME_Refresh(DATETIME_INFO *infoPtr, HDC hdc)
static LRESULT WINAPI DATETIME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LRESULT DATETIME_Command(DATETIME_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static DWORD DATETIME_GetSystemTime(const DATETIME_INFO *infoPtr, SYSTEMTIME *systime)
static LRESULT DATETIME_LButtonDown(DATETIME_INFO *infoPtr, INT x, INT y)
static LRESULT DATETIME_Destroy(DATETIME_INFO *infoPtr)
static const SYSTEMTIME min_allowed_date
static BOOL DATETIME_SendDateTimeChangeNotify(const DATETIME_INFO *infoPtr)
static LRESULT DATETIME_KillFocus(DATETIME_INFO *infoPtr, HWND lostFocus)
static LRESULT DATETIME_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace)
static LRESULT DATETIME_SetFont(DATETIME_INFO *infoPtr, HFONT font, BOOL repaint)
static LRESULT DATETIME_StyleChanging(DATETIME_INFO *infoPtr, WPARAM wStyleType, STYLESTRUCT *lpss)
static LRESULT DATETIME_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs)
static BOOL DATETIME_SetSystemTime(DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *systime)
static void DATETIME_SetSelectedField(DATETIME_INFO *infoPtr, int select)
static BOOL DATETIME_SetFormatW(DATETIME_INFO *infoPtr, LPCWSTR format)
static const WCHAR allowedformatchars[]
static LRESULT DATETIME_EraseBackground(const DATETIME_INFO *infoPtr, HDC hdc)
static BOOL DATETIME_GetIdealSize(DATETIME_INFO *infoPtr, SIZE *size)
static LRESULT DATETIME_Paint(DATETIME_INFO *infoPtr, HDC hdc)
static void DATETIME_ApplySelectedField(DATETIME_INFO *infoPtr)
#define MultiByteToWideChar
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
static const WCHAR month[12][4]
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
#define wrap(journal, var)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
static unsigned int number
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define LOCALE_USER_DEFAULT
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
#define DTN_DATETIMECHANGE
#define DTS_SHORTDATECENTURYFORMAT
#define DTM_SETSYSTEMTIME
#define DATETIMEPICK_CLASSW
#define MCM_GETMINREQRECT
#define DTS_LONGDATEFORMAT
#define DTM_GETSYSTEMTIME
COLORREF clrActiveCaption
static unsigned int bufptr
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
#define LOCALE_SSHORTDATE
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_STIMEFORMAT
#define LOCALE_SABBREVDAYNAME1
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free