comctl32: datetime: Return 1 in DTM_SETFORMAT when successful.

This commit is contained in:
Kanit Therdsteerasukdi 2007-03-15 09:47:48 -07:00 committed by Alexandre Julliard
parent cecd205f13
commit fed00cb82e
2 changed files with 6 additions and 8 deletions

View File

@ -279,7 +279,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat)
DATETIME_UseFormat (infoPtr, lpszFormat); DATETIME_UseFormat (infoPtr, lpszFormat);
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE); InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
return infoPtr->nrFields; return 1;
} }

View File

@ -190,14 +190,12 @@ static void test_dtm_set_format(HWND hWndDateTime)
{ {
LRESULT r; LRESULT r;
todo_wine { r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL);
r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL); expect(1, r);
expect(1, r);
r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0,
(LPARAM)"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy"); (LPARAM)"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy");
expect(1, r); expect(1, r);
}
ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_format_seq, "test_dtm_set_format", FALSE); ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_format_seq, "test_dtm_set_format", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES); flush_sequences(sequences, NUM_MSG_SEQUENCES);