comctl32: datetime: Return 1 in DTM_SETFORMAT when successful
Kanit Therdsteerasukdi
therdste at ucla.edu
Thu Mar 15 11:47:48 CDT 2007
This fixes 2 todo_wines. DTM_SETFORMAT should return 1 when successful
rather than the number of fields in the format string contained in the input
lpszFormat.
-------------- next part --------------
>From ae2c1ab7e581556d908508ad53442167f422b38c Mon Sep 17 00:00:00 2001
From: Kanit Therdsteerasukdi <therdste at ucla.edu>
Date: Wed, 14 Mar 2007 21:19:23 -0700
Subject: [PATCH] comctl32: datetime: Return 1 in DTM_SETFORMAT when successful
---
dlls/comctl32/datetime.c | 2 +-
dlls/comctl32/tests/datetime.c | 14 ++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index 0f0e211..a367af0 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -279,7 +279,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat)
DATETIME_UseFormat (infoPtr, lpszFormat);
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
- return infoPtr->nrFields;
+ return 1;
}
diff --git a/dlls/comctl32/tests/datetime.c b/dlls/comctl32/tests/datetime.c
index 3751862..7e3e118 100644
--- a/dlls/comctl32/tests/datetime.c
+++ b/dlls/comctl32/tests/datetime.c
@@ -190,14 +190,12 @@ static void test_dtm_set_format(HWND hWndDateTime)
{
LRESULT r;
- todo_wine {
- r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL);
- expect(1, r);
-
- r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0,
- (LPARAM)"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy");
- expect(1, r);
- }
+ r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0, (LPARAM)NULL);
+ expect(1, r);
+
+ r = SendMessage(hWndDateTime, DTM_SETFORMAT, 0,
+ (LPARAM)"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy");
+ expect(1, r);
ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_format_seq, "test_dtm_set_format", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
--
1.4.4.4
More information about the wine-patches
mailing list