comctl32/datetime: Do not call default procedure for WM_NCCREATE.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-09-25 10:36:16 +03:00 committed by Alexandre Julliard
parent 025b3de29c
commit 9a5c9be164
2 changed files with 12 additions and 1 deletions

View File

@ -1277,7 +1277,7 @@ DATETIME_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs)
dwExStyle |= WS_EX_CLIENTEDGE;
SetWindowLongW(hwnd, GWL_EXSTYLE, dwExStyle);
return DefWindowProcW(hwnd, WM_NCCREATE, 0, (LPARAM)lpcs);
return 1;
}

View File

@ -765,6 +765,7 @@ static void test_wm_set_get_text(void)
{
static const CHAR a_str[] = "a";
CHAR buff[16], time[16], caltype[3];
WCHAR buffW[16];
HWND hWnd;
LRESULT ret;
@ -802,6 +803,16 @@ static void test_wm_set_get_text(void)
}
DestroyWindow(hWnd);
/* Window text is not preserved. */
hWnd = CreateWindowExA(0, DATETIMEPICK_CLASSA, "testname", 0, 0, 50, 300, 120,
NULL, NULL, NULL, NULL);
buffW[0] = 1;
InternalGetWindowText(hWnd, buffW, ARRAY_SIZE(buffW));
ok(!buffW[0], "Unexpected window text %s.\n", wine_dbgstr_w(buffW));
DestroyWindow(hWnd);
}
static void test_dts_shownone(void)