1 | |
---|
2 | // Copyright Eóin O'Callaghan 2006 - 2007. |
---|
3 | // Distributed under the Boost Software License, Version 1.0. |
---|
4 | // (See accompanying file LICENSE_1_0.txt or copy at |
---|
5 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
6 | |
---|
7 | #pragma once |
---|
8 | |
---|
9 | #define WINVER 0x0500 |
---|
10 | #define _WIN32_WINNT 0x0500 |
---|
11 | #define _WIN32_IE 0x0500 |
---|
12 | #define _RICHEDIT_VER 0x0200 |
---|
13 | #define VC_EXTRALEAN |
---|
14 | |
---|
15 | #ifndef WIN32_LEAN_AND_MEAN |
---|
16 | #define WIN32_LEAN_AND_MEAN |
---|
17 | #endif |
---|
18 | |
---|
19 | #define HALITE_SENDING_CMD 68816889 |
---|
20 | |
---|
21 | // #define _WTL_NO_AUTOMATIC_NAMESPACE |
---|
22 | |
---|
23 | #include <winsock2.h> |
---|
24 | #include <shellapi.h> |
---|
25 | #include <atlbase.h> |
---|
26 | #include <atlapp.h> |
---|
27 | |
---|
28 | extern WTL::CAppModule _Module; |
---|
29 | #define _ATL_USE_DDX_FLOAT |
---|
30 | |
---|
31 | #include <atlwin.h> |
---|
32 | #include <atlframe.h> |
---|
33 | #include <atlmisc.h> |
---|
34 | #include <atlcrack.h> |
---|
35 | #include <atldlgs.h> |
---|
36 | #include <atlsplit.h> |
---|
37 | #include <atlctrls.h> |
---|
38 | #include <atlctrlw.h> |
---|
39 | #include <atlctrlx.h> |
---|
40 | #include <atlddx.h> |
---|
41 | #include <atlscrl.h> |
---|
42 | |
---|
43 | #include "AtlAutosizeDlg.h" |
---|
44 | //#include <stlsoft/util/nulldef.h> |
---|
45 | |
---|
46 | #include "global/wtl_app.hpp" |
---|
47 | #include "global/string_conv.hpp" |
---|
48 | |
---|
49 | template<class T> |
---|
50 | class RedrawLock |
---|
51 | { |
---|
52 | public: |
---|
53 | RedrawLock(T& window) : |
---|
54 | window_(window) |
---|
55 | { |
---|
56 | window_.SetRedraw(false); |
---|
57 | } |
---|
58 | |
---|
59 | ~RedrawLock() |
---|
60 | { |
---|
61 | unlock(); |
---|
62 | } |
---|
63 | |
---|
64 | void unlock() |
---|
65 | { |
---|
66 | window_.SetRedraw(true); |
---|
67 | window_.InvalidateRect(NULL, true); |
---|
68 | } |
---|
69 | |
---|
70 | private: |
---|
71 | T& window_; |
---|
72 | }; |
---|
73 | |
---|
74 | // Include very common C++ and Boost libraries |
---|
75 | |
---|
76 | #include <string> |
---|
77 | #include <vector> |
---|
78 | #include <boost/foreach.hpp> |
---|
79 | #include <boost/format.hpp> |
---|
80 | #include <boost/array.hpp> |
---|
81 | #include <boost/lexical_cast.hpp> |
---|
82 | #include <boost/bind.hpp> |
---|
83 | #include <boost/thread/thread.hpp> |
---|
84 | #include <boost/thread/recursive_mutex.hpp> |
---|
85 | #include <boost/smart_ptr.hpp> |
---|
86 | #include <boost/filesystem/path.hpp> |
---|
87 | #include <boost/filesystem/operations.hpp> |
---|
88 | #include <boost/noncopyable.hpp> |
---|
89 | #include <boost/tuple/tuple.hpp> |
---|
90 | |
---|
91 | #include <boost/archive/xml_woarchive.hpp> |
---|
92 | #include <boost/archive/xml_wiarchive.hpp> |
---|
93 | #include <boost/date_time/posix_time/time_serialize.hpp> |
---|
94 | |
---|
95 | using std::string; |
---|
96 | using std::wstring; |
---|
97 | |
---|
98 | using boost::lexical_cast; |
---|
99 | using boost::array; |
---|
100 | using boost::format; |
---|
101 | using boost::wformat; |
---|
102 | using boost::bind; |
---|
103 | using boost::thread; |
---|
104 | using boost::shared_ptr; |
---|
105 | using boost::scoped_ptr; |
---|
106 | using boost::filesystem::path; |
---|
107 | using boost::filesystem::wpath; |
---|
108 | using boost::noncopyable; |
---|
109 | |
---|
110 | template<class Archive> |
---|
111 | void serialize(Archive& ar, WTL::CRect& rect, const unsigned int version) |
---|
112 | { |
---|
113 | ar & BOOST_SERIALIZATION_NVP(rect.top); |
---|
114 | ar & BOOST_SERIALIZATION_NVP(rect.bottom); |
---|
115 | ar & BOOST_SERIALIZATION_NVP(rect.left); |
---|
116 | ar & BOOST_SERIALIZATION_NVP(rect.right); |
---|
117 | } |
---|
118 | |
---|
119 | namespace hal |
---|
120 | { |
---|
121 | |
---|
122 | namespace fs = boost::filesystem; |
---|
123 | namespace pt = boost::posix_time; |
---|
124 | |
---|
125 | using std::pair; |
---|
126 | using std::make_pair; |
---|
127 | |
---|
128 | using boost::tuple; |
---|
129 | |
---|
130 | } |
---|
131 | |
---|
132 | #define foreach BOOST_FOREACH |
---|