📄 winnls.h
字号:
#define LOCALE_IDEFAULTLANGUAGE 0x00000009 // default language id
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A // default country code
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B // default oem code page
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 // default ansi code page
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page
#define LOCALE_SLIST 0x0000000C // list item separator
#define LOCALE_IMEASURE 0x0000000D // 0 = metric, 1 = US
#define LOCALE_SDECIMAL 0x0000000E // decimal separator
#define LOCALE_STHOUSAND 0x0000000F // thousand separator
#define LOCALE_SGROUPING 0x00000010 // digit grouping
#define LOCALE_IDIGITS 0x00000011 // number of fractional digits
#define LOCALE_ILZERO 0x00000012 // leading zeros for decimal
#define LOCALE_INEGNUMBER 0x00001010 // negative number mode
#define LOCALE_SNATIVEDIGITS 0x00000013 // native ascii 0-9
#define LOCALE_SCURRENCY 0x00000014 // local monetary symbol
#define LOCALE_SINTLSYMBOL 0x00000015 // intl monetary symbol
#define LOCALE_SMONDECIMALSEP 0x00000016 // monetary decimal separator
#define LOCALE_SMONTHOUSANDSEP 0x00000017 // monetary thousand separator
#define LOCALE_SMONGROUPING 0x00000018 // monetary grouping
#define LOCALE_ICURRDIGITS 0x00000019 // # local monetary digits
#define LOCALE_IINTLCURRDIGITS 0x0000001A // # intl monetary digits
#define LOCALE_ICURRENCY 0x0000001B // positive currency mode
#define LOCALE_INEGCURR 0x0000001C // negative currency mode
#define LOCALE_SDATE 0x0000001D // date separator
#define LOCALE_STIME 0x0000001E // time separator
#define LOCALE_SSHORTDATE 0x0000001F // short date format string
#define LOCALE_SLONGDATE 0x00000020 // long date format string
#define LOCALE_STIMEFORMAT 0x00001003 // time format string
#define LOCALE_IDATE 0x00000021 // short date format ordering
#define LOCALE_ILDATE 0x00000022 // long date format ordering
#define LOCALE_ITIME 0x00000023 // time format specifier
#define LOCALE_ITIMEMARKPOSN 0x00001005 // time marker position
#define LOCALE_ICENTURY 0x00000024 // century format specifier (short date)
#define LOCALE_ITLZERO 0x00000025 // leading zeros in time field
#define LOCALE_IDAYLZERO 0x00000026 // leading zeros in day field (short date)
#define LOCALE_IMONLZERO 0x00000027 // leading zeros in month field (short date)
#define LOCALE_S1159 0x00000028 // AM designator
#define LOCALE_S2359 0x00000029 // PM designator
#define LOCALE_ICALENDARTYPE 0x00001009 // type of calendar specifier
#define LOCALE_IOPTIONALCALENDAR 0x0000100B // additional calendar types specifier
#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C // first day of week specifier
#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D // first week of year specifier
#define LOCALE_SDAYNAME1 0x0000002A // long name for Monday
#define LOCALE_SDAYNAME2 0x0000002B // long name for Tuesday
#define LOCALE_SDAYNAME3 0x0000002C // long name for Wednesday
#define LOCALE_SDAYNAME4 0x0000002D // long name for Thursday
#define LOCALE_SDAYNAME5 0x0000002E // long name for Friday
#define LOCALE_SDAYNAME6 0x0000002F // long name for Saturday
#define LOCALE_SDAYNAME7 0x00000030 // long name for Sunday
#define LOCALE_SABBREVDAYNAME1 0x00000031 // abbreviated name for Monday
#define LOCALE_SABBREVDAYNAME2 0x00000032 // abbreviated name for Tuesday
#define LOCALE_SABBREVDAYNAME3 0x00000033 // abbreviated name for Wednesday
#define LOCALE_SABBREVDAYNAME4 0x00000034 // abbreviated name for Thursday
#define LOCALE_SABBREVDAYNAME5 0x00000035 // abbreviated name for Friday
#define LOCALE_SABBREVDAYNAME6 0x00000036 // abbreviated name for Saturday
#define LOCALE_SABBREVDAYNAME7 0x00000037 // abbreviated name for Sunday
#define LOCALE_SMONTHNAME1 0x00000038 // long name for January
#define LOCALE_SMONTHNAME2 0x00000039 // long name for February
#define LOCALE_SMONTHNAME3 0x0000003A // long name for March
#define LOCALE_SMONTHNAME4 0x0000003B // long name for April
#define LOCALE_SMONTHNAME5 0x0000003C // long name for May
#define LOCALE_SMONTHNAME6 0x0000003D // long name for June
#define LOCALE_SMONTHNAME7 0x0000003E // long name for July
#define LOCALE_SMONTHNAME8 0x0000003F // long name for August
#define LOCALE_SMONTHNAME9 0x00000040 // long name for September
#define LOCALE_SMONTHNAME10 0x00000041 // long name for October
#define LOCALE_SMONTHNAME11 0x00000042 // long name for November
#define LOCALE_SMONTHNAME12 0x00000043 // long name for December
#define LOCALE_SMONTHNAME13 0x0000100E // long name for 13th month (if exists)
#define LOCALE_SABBREVMONTHNAME1 0x00000044 // abbreviated name for January
#define LOCALE_SABBREVMONTHNAME2 0x00000045 // abbreviated name for February
#define LOCALE_SABBREVMONTHNAME3 0x00000046 // abbreviated name for March
#define LOCALE_SABBREVMONTHNAME4 0x00000047 // abbreviated name for April
#define LOCALE_SABBREVMONTHNAME5 0x00000048 // abbreviated name for May
#define LOCALE_SABBREVMONTHNAME6 0x00000049 // abbreviated name for June
#define LOCALE_SABBREVMONTHNAME7 0x0000004A // abbreviated name for July
#define LOCALE_SABBREVMONTHNAME8 0x0000004B // abbreviated name for August
#define LOCALE_SABBREVMONTHNAME9 0x0000004C // abbreviated name for September
#define LOCALE_SABBREVMONTHNAME10 0x0000004D // abbreviated name for October
#define LOCALE_SABBREVMONTHNAME11 0x0000004E // abbreviated name for November
#define LOCALE_SABBREVMONTHNAME12 0x0000004F // abbreviated name for December
#define LOCALE_SABBREVMONTHNAME13 0x0000100F // abbreviated name for 13th month (if exists)
#define LOCALE_SPOSITIVESIGN 0x00000050 // positive sign
#define LOCALE_SNEGATIVESIGN 0x00000051 // negative sign
#define LOCALE_IPOSSIGNPOSN 0x00000052 // positive sign position
#define LOCALE_INEGSIGNPOSN 0x00000053 // negative sign position
#define LOCALE_IPOSSYMPRECEDES 0x00000054 // mon sym precedes pos amt
#define LOCALE_IPOSSEPBYSPACE 0x00000055 // mon sym sep by space from pos amt
#define LOCALE_INEGSYMPRECEDES 0x00000056 // mon sym precedes neg amt
#define LOCALE_INEGSEPBYSPACE 0x00000057 // mon sym sep by space from neg amt
#if(WINVER >= 0x0400)
#define LOCALE_FONTSIGNATURE 0x00000058 // font signature
#define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language name
#define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country name
#endif /* WINVER >= 0x0400 */
#if(WINVER >= 0x0500)
#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 // default ebcdic code page
#define LOCALE_IPAPERSIZE 0x0000100A // 1 = letter, 5 = legal, 8 = a3, 9 = a4
#define LOCALE_SENGCURRNAME 0x00001007 // english name of currency
#define LOCALE_SNATIVECURRNAME 0x00001008 // native name of currency
#define LOCALE_SYEARMONTH 0x00001006 // year month format string
#define LOCALE_SSORTNAME 0x00001013 // sort name
#define LOCALE_IDIGITSUBSTITUTION 0x00001014 // 0 = context, 1 = none, 2 = national
#endif /* WINVER >= 0x0500 */
//
// Time Flags for GetTimeFormat.
//
#define TIME_NOMINUTESORSECONDS 0x00000001 // do not use minutes or seconds
#define TIME_NOSECONDS 0x00000002 // do not use seconds
#define TIME_NOTIMEMARKER 0x00000004 // do not use time marker
#define TIME_FORCE24HOURFORMAT 0x00000008 // always use 24 hour format
//
// Date Flags for GetDateFormat.
//
#define DATE_SHORTDATE 0x00000001 // use short date picture
#define DATE_LONGDATE 0x00000002 // use long date picture
#define DATE_USE_ALT_CALENDAR 0x00000004 // use alternate calendar (if any)
#if(WINVER >= 0x0500)
#define DATE_YEARMONTH 0x00000008 // use year month picture
#define DATE_LTRREADING 0x00000010 // add marks for left to right reading order layout
#define DATE_RTLREADING 0x00000020 // add marks for right to left reading order layout
#endif /* WINVER >= 0x0500 */
//
// Calendar Types.
//
// These types are used for the EnumCalendarInfo and GetCalendarInfo
// NLS API routines.
// Some of these types are also used for the SetCalendarInfo NLS API
// routine.
//
//
// The following CalTypes may be used in combination with any other CalTypes.
//
// CAL_NOUSEROVERRIDE
//
// CAL_USE_CP_ACP is used in the A (Ansi) apis that need to do string
// translation.
//
// CAL_RETURN_NUMBER will return the result from GetCalendarInfo as a
// number instead of a string. This flag is only valid for the CalTypes
// beginning with CAL_I.
//
#if(WINVER >= 0x0500)
#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE // do not use user overrides
#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP // use the system ACP
#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER // return number instead of string
#endif /* WINVER >= 0x0500 */
//
// The following CalTypes are mutually exclusive in that they may NOT
// be used in combination with each other.
//
#define CAL_ICALINTVALUE 0x00000001 // calendar type
#define CAL_SCALNAME 0x00000002 // native name of calendar
#define CAL_IYEAROFFSETRANGE 0x00000003 // starting years of eras
#define CAL_SERASTRING 0x00000004 // era name for IYearOffsetRanges
#define CAL_SSHORTDATE 0x00000005 // short date format string
#define CAL_SLONGDATE 0x00000006 // long date format string
#define CAL_SDAYNAME1 0x00000007 // native name for Monday
#define CAL_SDAYNAME2 0x00000008 // native name for Tuesday
#define CAL_SDAYNAME3 0x00000009 // native name for Wednesday
#define CAL_SDAYNAME4 0x0000000a // native name for Thursday
#define CAL_SDAYNAME5 0x0000000b // native name for Friday
#define CAL_SDAYNAME6 0x0000000c // native name for Saturday
#define CAL_SDAYNAME7 0x0000000d // native name for Sunday
#define CAL_SABBREVDAYNAME1 0x0000000e // abbreviated name for Monday
#define CAL_SABBREVDAYNAME2 0x0000000f // abbreviated name for Tuesday
#define CAL_SABBREVDAYNAME3 0x00000010 // abbreviated name for Wednesday
#define CAL_SABBREVDAYNAME4 0x00000011 // abbreviated name for Thursday
#define CAL_SABBREVDAYNAME5 0x00000012 // abbreviated name for Friday
#define CAL_SABBREVDAYNAME6 0x00000013 // abbreviated name for Saturday
#define CAL_SABBREVDAYNAME7 0x00000014 // abbreviated name for Sunday
#define CAL_SMONTHNAME1 0x00000015 // native name for January
#define CAL_SMONTHNAME2 0x00000016 // native name for February
#define CAL_SMONTHNAME3 0x00000017 // native name for March
#define CAL_SMONTHNAME4 0x00000018 // native name for April
#define CAL_SMONTHNAME5 0x00000019 // native name for May
#define CAL_SMONTHNAME6 0x0000001a // native name for June
#define CAL_SMONTHNAME7 0x0000001b // native name for July
#define CAL_SMONTHNAME8 0x0000001c // native name for August
#define CAL_SMONTHNAME9 0x0000001d // native name for September
#define CAL_SMONTHNAME10 0x0000001e // native name for October
#define CAL_SMONTHNAME11 0x0000001f // native name for November
#define CAL_SMONTHNAME12 0x00000020 // native name for December
#define CAL_SMONTHNAME13 0x00000021 // native name for 13th month (if any)
#define CAL_SABBREVMONTHNAME1 0x00000022 // abbreviated name for January
#define CAL_SABBREVMONTHNAME2 0x00000023 // abbreviated name for February
#define CAL_SABBREVMONTHNAME3 0x00000024 // abbreviated name for March
#define CAL_SABBREVMONTHNAME4 0x00000025 // abbreviated name for April
#define CAL_SABBREVMONTHNAME5 0x00000026 // abbreviated name for May
#define CAL_SABBREVMONTHNAME6 0x00000027 // abbreviated name for June
#define CAL_SABBREVMONTHNAME7 0x00000028 // abbreviated name for July
#define CAL_SABBREVMONTHNAME8 0x00000029 // abbreviated name for August
#define CAL_SABBREVMONTHNAME9 0x0000002a // abbreviated name for September
#define CAL_SABBREVMONTHNAME10 0x0000002b // abbreviated name for October
#define CAL_SABBREVMONTHNAME11 0x0000002c // abbreviated name for November
#define CAL_SABBREVMONTHNAME12 0x0000002d // abbreviated name for December
#define CAL_SABBREVMONTHNAME13 0x0000002e // abbreviated name for 13th month (if any)
#if(WINVER >= 0x0500)
#define CAL_SYEARMONTH 0x0000002f // year month format string
#define CAL_ITWODIGITYEARMAX 0x00000030 // two digit year max
#endif /* WINVER >= 0x0500 */
//
// Calendar Enumeration Value.
//
#define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars
//
// Calendar ID Values.
//
#define CAL_GREGORIAN 1 // Gregorian (localized) calendar
#define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar
#define CAL_JAPAN 3 // Japanese Emperor Era calendar
#define CAL_TAIWAN 4 // Taiwan Era calendar
#define CAL_KOREA 5 // Korean Tangun Era calendar
#define CAL_HIJRI 6 // Hijri (Arabic Lunar) calendar
#define CAL_THAI 7 // Thai calendar
#define CAL_HEBREW 8 // Hebrew (Lunar) calendar
#define CAL_GREGORIAN_ME_FRENCH 9 // Gregorian Middle East French calendar
#define CAL_GREGORIAN_ARABIC 10 // Gregorian Arabic calendar
#define CAL_GREGORIAN_XLIT_ENGLISH 11 // Gregorian Transliterated English calendar
#define CAL_GREGORIAN_XLIT_FRENCH 12 // Gregorian Transliterated French calendar
//
// Language Group ID Values.
//
#define LGRPID_WESTERN_EUROPE 0x0001 // Western Europe & U.S.
#define LGRPID_CENTRAL_EUROPE 0x0002 // Central Europe
#define LGRPID_BALTIC 0x0003 // Baltic
#define LGRPID_GREEK 0x0004 // Greek
#define LGRPID_CYRILLIC 0x0005 // Cyrillic
#define LGRPID_TURKISH 0x0006 // Turkish
#define LGRPID_JAPANESE 0x0007 // Japanese
#define LGRPID_KOREAN 0x0008 // Korean
#define LGRPID_TRADITIONAL_CHINESE 0x0009 // Traditional Chinese
#define LGRPID_SIMPLIFIED_CHINESE 0x000a // Simplified Chinese
#define LGRPID_THAI 0x000b // Thai
#define LGRPID_HEBREW 0x000c // Hebrew
#define LGRPID_ARABIC 0x000d // Arabic
#define LGRPID_VIETNAMESE 0x000e // Vietnamese
#define LGRPID_INDIC 0x000f // Indic
#define LGRPID_GEORGIAN 0x0010 // Georgian
#define LGRPID_ARMENIAN 0x0011 // Armenian
////////////////////////////////////////////////////////////////////////////
//
// Typedefs
//
// Define all types for the NLS component here.
//
////////////////////////////////////////////////////////////////////////////
//
// Language Group ID.
//
typedef DWORD LGRPID;
//
// Locale type constant.
//
typedef DWORD LCTYPE;
//
// Calendar type constant.
//
typedef DWORD CALTYPE;
//
// Calendar ID.
//
typedef DWORD CALID;
//
// CP Info.
//
typedef struct _cpinfo {
UINT MaxCharSize; // max length (in bytes) of a char
BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character
BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
} CPINFO, *LPCPINFO;
typedef struct _cpinfoexA {
UINT MaxCharSize; // max length (in bytes) of a char
BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character (MB)
BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
WCHAR UnicodeDefaultChar; // default character (Unicode)
UINT CodePage; // code page id
CHAR CodePageName[MAX_PATH]; // code page name (Unicode)
} CPINFOEXA, *LPCPINFOEXA;
typedef struct _cpinfoexW {
UINT MaxCharSize; // max length (in bytes) of a char
BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character (MB)
BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
WCHAR UnicodeDefaultChar; // default character (Unicode)
UINT CodePage; // code page id
WCHAR CodePageName[MAX_PATH]; // code page name (Unicode)
} CPINFOEXW, *LPCPINFOEXW;
#ifdef UNICODE
typedef CPINFOEXW CPINFOEX;
typedef LPCPINFOEXW LPCPINFOEX;
#else
typedef CPINFOEXA CPINFOEX;
typedef LPCPINFOEXA LPCPINFOEX;
#endif // UNICODE
//
// Number format.
//
typedef struct _numberfmtA {
UINT NumDigits; // number of decimal digits
UINT LeadingZero; // if leading zero in decimal fields
UINT Grouping; // group size left of decimal
LPSTR lpDecimalSep; // ptr to decimal separator string
LPSTR lpThousandSep; // ptr to thousand separator string
UINT NegativeOrder; // negative number ordering
} NUMBERFMTA, *LPNUMBERFMTA;
typedef struct _numberfmtW {
UINT NumDigits; // number of decimal digits
UINT LeadingZero; // if leading zero in decimal fields
UINT Grouping; // group size left of decimal
LPWSTR lpDecimalSep; // ptr to decimal separator string
LPWSTR lpThousandSep; // ptr to thousand separator string
UINT NegativeOrder; // negative number ordering
} NUMBERFMTW, *LPNUMBERFMTW;
#ifdef UNICODE
typedef NUMBERFMTW NUMBERFMT;
typedef LPNUMBERFMTW LPNUMBERFMT;
#else
typedef NUMBERFMTA NUMBERFMT;
typedef LPNUMBERFMTA LPNUMBERFMT;
#endif // UNICODE
//
// Currency format.
//
typedef struct _currencyfmtA {
UINT NumDigits; // number of decimal digits
UINT LeadingZero; // if leading zero in decimal fields
UINT Grouping; // group size left of decimal
LPSTR lpDecimalSep; // ptr to decimal separator string
LPSTR lpThousandSep; // ptr to thousand separator string
UINT NegativeOrder; // negative currency ordering
UINT PositiveOrder; // positive currency ordering
LPSTR lpCurrencySymbol; // ptr to currency symbol string
} CURRENCYFMTA, *LPCURRENCYFMTA;
typedef struct _currencyfmtW {
UINT NumDigits; // number of decimal digits
UINT LeadingZero; // if leading zero in decimal fields
UINT Grouping; // group size left of decimal
LPWSTR lpDecimalSep; // ptr to decimal separator string
LPWSTR lpThousandSep; // ptr to thousand separator string
UINT NegativeOrder; // negative currency ordering
UINT PositiveOrder; // positive currency ordering
LPWSTR lpCurrencySymbol; // ptr to currency symbol string
} CURRENCYFMTW, *LPCURRENCYFMTW;
#ifdef UNICODE
typedef CURRENCYFMTW CURRENCYFMT;
typedef LPCURRENCYFMTW LPCURRENCYFMT;
#else
typedef CURRENCYFMTA CURRENCYFMT;
typedef LPCURRENCYFMTA LPCURRENCYFMT;
#endif // UNICODE
//
// Enumeration function constants.
//
#ifdef STRICT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -