27#define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT))
29#define expect_unsuccess(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d(unsuccessful), got %ld(successful)\n", (EXPECTED), (GOT))
31#define NUM_MSG_SEQUENCES 1
32#define DATETIME_SEQ_INDEX 0
142 static LONG defwndproc_counter = 0;
153 defwndproc_counter++;
155 defwndproc_counter--;
175 if (!hWndDateTime)
return NULL;
199 (
LPARAM)
"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy");
207 systime.
wYear = 2000;
212 ok(
strcmp(txt,
"hh 12") == 0,
"String mismatch (\"%s\" vs \"hh 12\")\n", txt);
219 COLORREF theColor, prevColor, crColor;
223 ok(crColor != ~0
u,
"%s: Set RGB(0,0,0): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor);
225 theColor=
RGB(255,255,255);
227 ok(crColor==prevColor,
"%s: Set RGB(255,255,255): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor);
229 theColor=
RGB(100,180,220);
231 ok(crColor==prevColor,
"%s: Set RGB(100,180,220): Expected COLORREF of previous value, got %d\n", mccolor_name, crColor);
233 ok(crColor==theColor,
"%s: GETMCCOLOR: Expected %d, got %d\n", mccolor_name, theColor, crColor);
258 HFONT hFontOrig, hFontNew;
268 ok(hFontOrig == hFontNew,
"Expected hFontOrig==hFontNew, hFontOrig=%p, hFontNew=%p\n", hFontOrig, hFontNew);
285 ok(
r == 0,
"Expected NULL(no child month calendar control), got %ld\n",
r);
328#define expect_systime(ST1, ST2) ok(compare_systime((ST1), (ST2))==1, "ST1 != ST2\n")
329#define expect_systime_date(ST1, ST2) ok(compare_systime_date((ST1), (ST2))==1, "ST1.date != ST2.date\n")
330#define expect_systime_time(ST1, ST2) ok(compare_systime_time((ST1), (ST2))==1, "ST1.time != ST2.time\n")
411 ok(
r,
"got %lu\n",
r);
413 ok(
r == 0,
"got %lu\n",
r);
414 ok(getSt[0].wYear == 0 && getSt[1].wYear == 0,
"got %u, %u\n", getSt[0].wYear, getSt[1].wYear);
473 "ST1.time != ST2.time\n");
738 win_skip(
"DTM_GETIDEALSIZE is not available\n");
756 ok(
r,
"Expect DTM_GETIDEALSIZE message to return true\n");
758 "Expect size.cx > 0 and size.cy >= %d, got cx:%d cy:%d\n",
tm.tmHeight,
size.cx,
size.cy);
766 static const CHAR a_str[] =
"a";
777 "Expected CB_ERR, got %ld\n",
ret);
782 ok(
ret != 0,
"Expected non-zero return value\n");
789 skip(
"DateTimePicker Control only supports Gregorian calendar (type: %s)\n", caltype);
827#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
840 iccex.
dwSize =
sizeof(iccex);
842 pInitCommonControlsEx(&iccex);
int strcmp(const char *String1, const char *String2)
static void init_msg_sequences(struct msg_sequence **seq, int n)
static void flush_sequences(struct msg_sequence **seq, int n)
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
static DOUBLE day(DOUBLE time)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
static const WCHAR month[12][4]
static unsigned char buff[32768]
GLdouble GLdouble GLdouble r
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 * u
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
static const struct message test_dtm_get_monthcal_seq[]
#define expect_unsuccess(EXPECTED, GOT)
static void test_dtm_set_and_get_range(void)
static const struct message test_dtm_set_range_swap_min_max_seq[]
static LPARAM compare_systime_time(SYSTEMTIME *st1, SYSTEMTIME *st2)
static const struct message test_dtm_set_and_get_systime_with_limits[]
static void test_dtm_set_format(void)
#define NUM_MSG_SEQUENCES
static const struct message test_dtm_set_and_get_range_seq[]
static void fill_systime_struct(SYSTEMTIME *st, int year, int month, int dayofweek, int day, int hour, int minute, int second, int milliseconds)
#define expect_systime(ST1, ST2)
static const struct message test_dtm_set_format_seq[]
static void test_wm_set_get_text(void)
static LPARAM compare_systime(SYSTEMTIME *st1, SYSTEMTIME *st2)
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
static void test_dtm_set_range_swap_min_max(void)
static const struct message test_dtm_set_and_get_system_time_seq[]
static const struct message test_dtm_set_and_get_mcfont_seq[]
static void test_dtm_get_ideal_size(void)
#define expect(EXPECTED, GOT)
static void test_dtm_set_and_get_mccolor(void)
#define expect_systime_date(ST1, ST2)
static const struct message test_dtm_set_and_get_mccolor_seq[]
#define DATETIME_SEQ_INDEX
static HWND create_datetime_control(DWORD style)
static void test_dtm_set_and_get_systemtime_with_limits(void)
static void test_mccolor_types(HWND hWndDateTime, int mccolor_type, const char *mccolor_name)
static LRESULT WINAPI datetime_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void init_functions(void)
static void test_dts_shownone(void)
static void test_dtm_set_and_get_mcfont(void)
static void test_dtm_get_monthcal(void)
static void test_dtm_set_and_get_system_time(void)
static LPARAM compare_systime_date(SYSTEMTIME *st1, SYSTEMTIME *st2)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define LOCALE_USER_DEFAULT
#define DTM_SETSYSTEMTIME
#define DATETIMEPICK_CLASSA
#define MCSC_TRAILINGTEXT
#define DTM_GETSYSTEMTIME
CHAR lfFaceName[LF_FACESIZE]
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
HGDIOBJ WINAPI GetStockObject(_In_ int)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
#define LOCALE_ICALENDARTYPE
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SetWindowLongPtrA
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR 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)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetWindowLongPtrA
HDC WINAPI GetDC(_In_opt_ HWND)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)