This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / subsys / system / explorer / Seashell / SeaShellExt / Include / LocaleInfo.h
1 //*******************************************************************************
2 // COPYRIGHT NOTES
3 // ---------------
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.
10 // 
11 // For the latest updates to this code, check this site:
12 // http://www.masmex.com 
13 // after Sept 2000
14 // 
15 // Copyright(C) 2000 Philip Oldaker <email: philip@masmex.com>
16 //*******************************************************************************
17
18 // LocaleInfo.h: interface for the CLocaleInfo class.
19 //
20 //////////////////////////////////////////////////////////////////////
21
22 #if !defined(AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_)
23 #define AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_
24
25 #if _MSC_VER > 1000
26 #pragma once
27 #endif // _MSC_VER > 1000
28
29 class CTRL_EXT_CLASS CLocaleInfo  
30 {
31 public:
32         CLocaleInfo();
33         virtual ~CLocaleInfo();
34 public:
35 // Properties
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);
48 protected:
49         void StdToWinFormatCode(CString &sCode);
50         void GetAllLocaleInfo();
51         void AllocLocaleInfo(LCTYPE lctype,LPTSTR *pszInfo);
52 private:
53     LPTSTR m_pszNegativeSign;
54     LPTSTR m_pszDecimalSep;
55     LPTSTR m_pszThousandSep;
56     LPTSTR m_pszLongDate;
57     LPTSTR m_pszShortDate;
58     LPTSTR m_pszLongTime;
59     LPTSTR m_pszShortTime;
60     LPTSTR m_pszDateSep;
61     LPTSTR m_pszTimeSep;
62 public:
63         static CLocaleInfo *CLocaleInfo::Instance();
64 };
65
66 inline LPCTSTR CLocaleInfo::GetNegativeSign() const
67 {
68         return m_pszNegativeSign;
69 }
70
71 inline LPCTSTR CLocaleInfo::GetDecimalSep() const
72 {
73         return m_pszDecimalSep;
74 }
75
76 inline LPCTSTR CLocaleInfo::GetThousandSep() const
77 {
78         return m_pszThousandSep;
79 }
80
81 inline LPCTSTR CLocaleInfo::GetLongDate() const
82 {
83         return m_pszLongDate;
84 }
85
86 inline LPCTSTR CLocaleInfo::GetShortTime() const
87 {
88         return m_pszShortTime;
89 }
90
91 inline LPCTSTR CLocaleInfo::GetLongTime() const
92 {
93         return m_pszLongTime;
94 }
95
96 inline LPCTSTR CLocaleInfo::GetShortDate() const
97 {
98         return m_pszShortDate;
99 }
100
101 inline LPCTSTR CLocaleInfo::GetDateSep() const
102 {
103         return m_pszDateSep;
104 }
105
106 inline LPCTSTR CLocaleInfo::GetTimeSep() const
107 {
108         return m_pszTimeSep;
109 }
110
111 #endif // !defined(AFX_LOCALEINFO_H__53D6820E_C28F_4DB9_AB7D_87B9E8EAE233__INCLUDED_)