Platform SDK: International Features <br><br>SetCalendarInfo<br>The SetCalendarInfo function sets an item of locale information for a calendar.<br><br>int SetCalendarInfo(<br> LCID Locale, // locale<br> CALID Calendar, // calendar<br> CALTYPE CalType, // calendar information type<br> LPCTSTR lpCalData // calendar data<br>);<br>Parameters<br>Locale <br>[in] Locale identifier (LCID). The LCID can be created by the MAKELCID macro, or it can be one of the following predefined values. Value Meaning <br>LOCALE_SYSTEM_DEFAULT Default system locale. <br>LOCALE_USER_DEFAULT Default user locale. <br><br><br>Calendar <br>[in] Identifier for the calendar whose information will be set. <br>CalType <br>[in] Type of calendar information to be set. Only one CALTYPE may be specified per call, except that an application may use the binary OR operator to combine CAL_USE_CP_ACP with any valid CALTYPE value. The CAL_USE_CP_ACP value is only used with the ANSI version of SetCalendarInfo <br>Windows 98/Me: The following CALTYPE values are valid for this function: <br><br>CAL_NOUSEROVERRIDE<br>CAL_USE_CP_ACP<br>CAL_RETURN_NUMBER<br>CAL_ITWODIGITYEARMAX <br><br>For more information on CALTYPE values, see Calendar Type Information. <br><br>lpCalData <br>[in] Pointer to a null-terminated string that contains the calendar information. The information must be in the format of the specified CalType. <br>Return Values<br>If the function succeeds, the return values is a nonzero value. <br><br>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: <br><br>ERROR_INVALID_ACCESS <br>ERROR_INVALID_FLAGS <br>ERROR_INVALID_PARAMETER <br>Remarks<br>This function only affects the user override portion of the calendar settings; it does not set the system defaults. <br><br>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.<br><br>Windows 98/Me: CAL_ITWODIGITYEARMAX is only supported for Gregorian calendars. <br><br>Windows 2000/XP: The ANSI version of this function will fail if it is used with a Unicode-only locale. See Table of Language Identifiers.<br><br>Windows 98/Me: SetCalendarInfoW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.<br><br>Requirements <br> Windows NT/2000/XP: Included in Windows 2000 and later.<br> Windows 95/98/Me: Included in Windows 98 and later.<br> Header: Declared in Winnls.h; include Windows.h.<br> Library: Use Kernel32.lib.<br> Unicode: Implemented as Unicode and ANSI versions on Windows 2000/XP. Also supported by Microsoft Layer for Unicode.<br><br>See Also<br>National Language Support Overview, National Language Support Functions, GetCalendarInfo <br><br><br>