SetCalendarInfo 的用法(100分) (100分)

  • 主题发起人 主题发起人 Mark.Y
  • 开始时间 开始时间
M

Mark.Y

Unregistered / Unconfirmed
GUEST, unregistred user!
如题请给出例子谢谢!
 
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>&nbsp; LCID Locale, &nbsp; &nbsp; &nbsp; // locale<br>&nbsp; CALID Calendar, &nbsp; &nbsp;// calendar<br>&nbsp; CALTYPE CalType, &nbsp; // calendar information type<br>&nbsp; LPCTSTR lpCalData &nbsp;// 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. &nbsp;<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>&nbsp; Windows NT/2000/XP: Included in Windows 2000 and later.<br>&nbsp; Windows 95/98/Me: Included in Windows 98 and later.<br>&nbsp; Header: Declared in Winnls.h; include Windows.h.<br>&nbsp; Library: Use Kernel32.lib.<br>&nbsp; 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>
 
它能改变星期简写吗如“星期一” 改为 “一”<br><br>请给出例子<br><br>
 
后退
顶部