网站首页  词典首页

请输入您要查询的函数:

 

术语 setcalendarinfo
释义 SetCalendarInfo
语法:
BOOL SetCalendarInfo(
__in LCID Locale,
__in CALID Calendar,
__in CALTYPE CalType,
__in LPCTSTR lpCalData
);
SetCalendarInfo功能
为日历设置的区域设置信息的项目。有关更多信息,请参阅日期和日历。
参数
区域设置 [in]
区域设置标识符指定的语言环境。您可以使用MAKELCID宏创建一个区域设置标识符或使用下列预定义的值之一。
LOCALE_INVARIANT
LOCALE_SYSTEM_DEFAULT
LOCALE_USER_DEFAULT
下面的自定义区域设置标识符也支持。
LOCALE_CUSTOM_DEFAULT
LOCALE_CUSTOM_UI_DEFAULT
LOCALE_CUSTOM_UNSPECIFIED
日历 [in]
日历标识符日历的设置信息。
CalType [in]
日历信息类型的设置。只有下列CALTYPE值是有效的这一功能。不断的CAL_USE_CP_ACP只为函数的ANSI版本的意义。
CAL_USE_CP_ACP
CAL_ITWODIGITYEARMAX
该应用程序只能指定一个每次调用这个函数日历标识符。一个例外,可如果应用程序使用的二进制运算符来合并或与任何有效CALTYPE在日历类型的信息定义的值CAL_USE_CP_ACP。
lpCalData [in]
指向一个以NULL结尾的日历信息的字符串。这些信息必须在指定的日历类型格式。
返回值
返回一个非零值如果成功,或否则为0。为了获得更多错误信息,应用程序可以调用GetLastError函数,可以返回以下错误代码之一:
ERROR_INTERNAL_ERROR。发生意外的错误的功能。
ERROR_INVALID_FLAGS。旗帜提供的值不是有效的。
ERROR_INVALID_PARAMETER。该参数值的任何无效。
备注
此功能只影响用户的日历设置覆盖部分。它不设置系统默认值。
日历信息始终传递一个空终止这一职能的Unicode版本的Unicode字符串,并作为空终止的ANSI字符串的ANSI版本。任何整数允许这项功能。任何数字值必须被指定为Unicode或ANSI文本。
当此函数的ANSI版本,是使用一个Unicode只设置标识符,函数可以成功,因为操作系统使用系统代码页。然而,在字符系统代码页未定义出现在一个字符串问号(?)。
CAL_ITWODIGITYEARMAX可用于任何日历,日历,即使没有指定语言环境的支持。为了避免并发症,应用程序应调用EnumCalendarInfo,以确保日历是个人利益的语言环境的支持。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinnls.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesSetCalendarInfoW(Unicode)和SetCalendarInfoA(ANSI)的
参见
国家语言支持
国家语言支持功能
EnumCalendarInfo
GetCalendarInfo
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月12号
==英文原文==SetCalendarInfo Function
Sets an item of locale information for a calendar. For more information, see Date and Calendar .
Syntax
BOOL SetCalendarInfo(
__in LCID Locale,
__in CALID Calendar,
__in CALTYPE CalType,
__in LPCTSTR lpCalData
);
Parameters
Locale [in]
Locale identifier that specifies the locale. You can use the MAKELCID macro to create a locale identifier or use one of the following predefined values.
LOCALE_INVARIANT
LOCALE_SYSTEM_DEFAULT
LOCALE_USER_DEFAULT
The following custom locale identifiers are also supported.
LOCALE_CUSTOM_DEFAULT
LOCALE_CUSTOM_UI_DEFAULT
LOCALE_CUSTOM_UNSPECIFIED
Calendar [in]
Calendar identifier for the calendar for which to set information.
CalType [in]
Type of calendar information to set. Only the following CALTYPE values are valid for this function. The CAL_USE_CP_ACP constant is only meaningful for the ANSI version of the function.
CAL_USE_CP_ACP
CAL_ITWODIGITYEARMAX
The application can specify only one calendar identifier per call to this function. An exception can be made if the application uses the binary OR operator to combine CAL_USE_CP_ACP with any valid CALTYPE value defined in Calendar Type Information .
lpCalData [in]
Pointer to a null-terminated calendar information string. The information must be in the format of the specified calendar type.
Return Value
Returns a nonzero value if successful, or 0 otherwise. To get extended error information, the application can call GetLastError , which can return one of the following error codes:
ERROR_INTERNAL_ERROR. An unexpected error occurred in the function.
ERROR_INVALID_FLAGS. The values supplied for flags were not valid.
ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
Remarks
This function only affects the user override portion of the calendar settings. It does not set the system defaults.
Calendar information is always passed as a null-terminated Unicode string in the Unicode version of this 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.
When the ANSI version of this function is used with a Unicode-only locale identifier, the function can succeed because the operating system uses the system code page. However, characters that are undefined in the system code page appear in the string as a question mark (?).
CAL_ITWODIGITYEARMAX can be used with any calendar, even if the calendar is not supported for the specified locale. To avoid complications, the application should call EnumCalendarInfo to ensure that the calendar is supported for the locale of interest.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinnls.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesSetCalendarInfoW (Unicode) and SetCalendarInfoA (ANSI)
See Also
National Language Support
National Language Support Functions
EnumCalendarInfo
GetCalendarInfo
Send comments about this topic to Microsoft
Build date: 7/12/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd374048(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:15:53