Re: comctl32: SysDateTimePick32 control add Alt+down hot key like windows
+ case WM_SYSKEYDOWN: + if (wParam == VK_DOWN) + { + POINT pt; + RECT rect; + GetClientRect(hwnd, &rect); + pt.x = rect.right - GetSystemMetrics(SM_CXVSCROLL)/2; + pt.y = rect.top + GetSystemMetrics(SM_CYHSCROLL)/2; + + return DATETIME_LButtonDown (infoPtr, (SHORT)pt.x, (SHORT)pt.y); + } +
If it really works this way you should just make it drop directly, without faking click point coordinates.
+static void test_dtm_hotkey(void) +{ + HWND hWnd; + HWND hWndMonthCal; + + hWnd = create_datetime_control(0); + ok(hWnd != NULL, "Expected window to be valid\n"); + ShowWindow(hWnd, SW_NORMAL); + + hWndMonthCal = SendMessageA(hWnd, DTM_GETMONTHCAL, 0, 0); + ok(hWndMonthCal != NULL, "Expected MonthCal to be valid\n"); + ok(!IsWindowVisible(hWndMonthCal), "Expected MonthCal to be invisible\n"); + + SendMessageA(hWnd, WM_SYSKEYDOWN, VK_DOWN, 0); + ok(IsWindowVisible(hWndMonthCal), "Expected MonthCal to be visible\n"); + + DestroyWindow(hWnd); +}
Please add notification tests too.
participants (1)
-
Nikolay Sivov