Platform SDK: International Features |
The SetCalendarInfo function sets an item of locale information for a calendar.
int SetCalendarInfo( LCID Locale, // locale CALID Calendar, // calendar CALTYPE CalType, // calendar information type LPCTSTR lpCalData // calendar data );
Value | Meaning |
---|---|
LOCALE_SYSTEM_DEFAULT | Default system locale. |
LOCALE_USER_DEFAULT | Default user locale. |
Windows 98: The following CALTYPE values are valid for this function:
CAL_NOUSEROVERRIDE
CAL_USE_CP_ACP
CAL_RETURN_NUMBER
CAL_ITWODIGITYEARMAX
For more information on CALTYPE values, see Calendar Type Information.
If the function succeeds, the return values is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError may return one of the following error codes:
This function only affects the user override portion of the calendar settings; it does not set the system defaults.
The calendar information is always passed in as a null-terminated Unicode string in the Unicode version of the function, and as a null-terminated ANSI string in the ANSI version. No integers are allowed by this function; any numeric values must be specified as either Unicode or ANSI text.
Windows 98: CAL_ITWODIGITYEARMAX is only supported for Gregorian calendars.
Windows 2000: The ANSI version of this function will fail if it is used with a Unicode-only locale. See Language Identifiers.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.
National Language Support Overview, National Language Support Functions, GetCalendarInfo