1 //*******************************************************************************
4 // You may use this source code, compile or redistribute it as part of your application
5 // for free. You cannot redistribute it as a part of a software development
6 // library without the agreement of the author. If the sources are
7 // distributed along with the application, you should leave the original
8 // copyright notes in the source code without any changes.
9 // This code can be used WITHOUT ANY WARRANTIES at your own risk.
11 // For the latest updates to this code, check this site:
12 // http://www.masmex.com
15 // Copyright(C) 2000 Philip Oldaker <email: philip@masmex.com>
16 //*******************************************************************************
18 // LocaleInfo.h: interface for the CLocaleInfo class.
20 //////////////////////////////////////////////////////////////////////
22 #if !defined(AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_)
23 #define AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_
27 #endif // _MSC_VER > 1000
29 class CTRL_EXT_CLASS CLocaleInfo
33 virtual ~CLocaleInfo();
36 LPCTSTR GetNegativeSign() const;
37 LPCTSTR GetDecimalSep() const;
38 LPCTSTR GetThousandSep() const;
39 LPCTSTR GetLongDate() const;
40 LPCTSTR GetShortDate() const;
41 LPCTSTR GetShortTime() const;
42 LPCTSTR GetLongTime() const;
43 LPCTSTR GetDateSep() const;
44 LPCTSTR GetTimeSep() const;
45 CString ConvertStdToWinFormat(LPCTSTR pszFormat);
46 CString FormatDateTime(const COleDateTime &oleDateTime);
47 CString FormatDateTime(const FILETIME &ft);
49 void StdToWinFormatCode(CString &sCode);
50 void GetAllLocaleInfo();
51 void AllocLocaleInfo(LCTYPE lctype,LPTSTR *pszInfo);
53 LPTSTR m_pszNegativeSign;
54 LPTSTR m_pszDecimalSep;
55 LPTSTR m_pszThousandSep;
57 LPTSTR m_pszShortDate;
59 LPTSTR m_pszShortTime;
63 static CLocaleInfo *CLocaleInfo::Instance();
66 inline LPCTSTR CLocaleInfo::GetNegativeSign() const
68 return m_pszNegativeSign;
71 inline LPCTSTR CLocaleInfo::GetDecimalSep() const
73 return m_pszDecimalSep;
76 inline LPCTSTR CLocaleInfo::GetThousandSep() const
78 return m_pszThousandSep;
81 inline LPCTSTR CLocaleInfo::GetLongDate() const
86 inline LPCTSTR CLocaleInfo::GetShortTime() const
88 return m_pszShortTime;
91 inline LPCTSTR CLocaleInfo::GetLongTime() const
96 inline LPCTSTR CLocaleInfo::GetShortDate() const
98 return m_pszShortDate;
101 inline LPCTSTR CLocaleInfo::GetDateSep() const
106 inline LPCTSTR CLocaleInfo::GetTimeSep() const
111 #endif // !defined(AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_)