comctl32/datetime: Use user locale for format.

This commit is contained in:
Nikolay Sivov 2010-03-13 22:43:30 +03:00 committed by Alexandre Julliard
parent da550ed257
commit b1b54ae39f
1 changed files with 3 additions and 3 deletions

View File

@ -289,7 +289,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat)
format_item = LOCALE_STIMEFORMAT; format_item = LOCALE_STIMEFORMAT;
else /* DTS_SHORTDATEFORMAT */ else /* DTS_SHORTDATEFORMAT */
format_item = LOCALE_SSHORTDATE; format_item = LOCALE_SSHORTDATE;
GetLocaleInfoW( GetSystemDefaultLCID(), format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0])); GetLocaleInfoW(LOCALE_USER_DEFAULT, format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0]));
lpszFormat = format_buf; lpszFormat = format_buf;
} }
@ -410,12 +410,12 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int
wsprintfW (result, fmt__2dW, date.wMonth); wsprintfW (result, fmt__2dW, date.wMonth);
break; break;
case THREECHARMONTH: case THREECHARMONTH:
GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1, GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1,
buffer, sizeof(buffer)/sizeof(buffer[0])); buffer, sizeof(buffer)/sizeof(buffer[0]));
wsprintfW (result, fmt__3sW, buffer); wsprintfW (result, fmt__3sW, buffer);
break; break;
case FULLMONTH: case FULLMONTH:
GetLocaleInfoW(GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1, GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1,
result, resultSize); result, resultSize);
break; break;
case ONELETTERAMPM: case ONELETTERAMPM: