00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00049 #ifndef ATLSTL_INCL_ATLSTL_WINDOW_HPP_WINDOW
00050 #define ATLSTL_INCL_ATLSTL_WINDOW_HPP_WINDOW
00051
00052 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00053 # define ATLSTL_VER_ATLSTL_WINDOW_HPP_WINDOW_MAJOR 1
00054 # define ATLSTL_VER_ATLSTL_WINDOW_HPP_WINDOW_MINOR 0
00055 # define ATLSTL_VER_ATLSTL_WINDOW_HPP_WINDOW_REVISION 2
00056 # define ATLSTL_VER_ATLSTL_WINDOW_HPP_WINDOW_EDIT 7
00057 #endif
00058
00059
00060
00061
00062
00063 #ifndef ATLSTL_INCL_ATLSTL_HPP_ATLSTL
00064 # include <atlstl/atlstl.hpp>
00065 #endif
00066 #ifndef ATLSTL_INCL_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW
00067 # include <atlstl/window/enhanced_window.hpp>
00068 #endif
00069 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_HPP_STRING
00070 # include <stlsoft/shims/access/string.hpp>
00071 #endif
00072
00073
00074
00075
00076
00077 #ifndef _ATLSTL_NO_NAMESPACE
00078 # if defined(_STLSOFT_NO_NAMESPACE) || \
00079 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00080
00081 namespace atlstl
00082 {
00083 # else
00084
00085
00086 namespace stlsoft
00087 {
00088
00089 namespace atlstl_project
00090 {
00091
00092 # endif
00093 #endif
00094
00095
00096
00097
00098
00105
00106 class Window
00107 : public CWindow
00108 , public EnhancedWindow<Window>
00109 {
00112 public:
00113 typedef CWindow parent_class_type;
00114 typedef Window class_type;
00116
00119 public:
00121 explicit Window(HWND hwnd = NULL)
00122 : parent_class_type(hwnd)
00123 {}
00124
00126 class_type& operator =(HWND hwnd)
00127 {
00128 parent_class_type::operator =(hwnd);
00129
00130 return *this;
00131 }
00132
00134 template< ss_typename_param_k S0
00135 , ss_typename_param_k S1
00136 >
00137 HWND Create(S0 const& lpstrWndClass
00138 , HWND hWndParent
00139 , RECT &rcPos
00140 , S1 const &szWindowName = NULL
00141 , DWORD dwStyle = 0
00142 , DWORD dwExStyle = 0
00143 , UINT nID = 0
00144 , LPVOID lpCreateParam = NULL)
00145 {
00146 return parent_class_type::Create(stlsoft::c_str_ptr(lpstrWndClass), hWndParent, rcPos, stlsoft::c_str_ptr(szWindowName), dwStyle, dwExStyle, nID, lpCreateParam);
00147 }
00148
00150 template< ss_typename_param_k S0
00151 , ss_typename_param_k S1
00152 >
00153 HWND Create(S0 const& lpstrWndClass
00154 , HWND hWndParent
00155 , LPRECT lpRect = NULL
00156 , S1 const& szWindowName = NULL
00157 , DWORD dwStyle = 0
00158 , DWORD dwExStyle = 0
00159 , HMENU hMenu = NULL
00160 , LPVOID lpCreateParam = NULL)
00161 {
00162 return parent_class_type::Create(stlsoft::c_str_ptr(lpstrWndClass), hWndParent, lpRect, stlsoft::c_str_ptr(szWindowName), dwStyle, dwExStyle, nID, lpCreateParam);
00163 }
00165
00168 public:
00169
00170
00171
00173 template <ss_typename_param_k S>
00174 BOOL SetWindowText(S const& lpszString)
00175 {
00176 return parent_class_type::SetWindowText(stlsoft::c_str_ptr(lpszString));
00177 }
00178
00179
00180
00181
00182 template <ss_typename_param_k S>
00183 BOOL SetDlgItemText(int nID, S const& lpszString)
00184 {
00185 return parent_class_type::SetDlgItemText(nID, stlsoft::c_str_ptr(lpszString));
00186 }
00187
00188
00189
00190
00191 template <ss_typename_param_k S>
00192 int MessageBox(S const& lpszText)
00193 {
00194 return parent_class_type::MessageBox(stlsoft::c_str_ptr(lpszText));
00195 }
00196 template< ss_typename_param_k S0
00197 , ss_typename_param_k S1
00198 >
00199 int MessageBox(S0 const& lpszText, S1 const& lpszCaption)
00200 {
00201 return parent_class_type::MessageBox(stlsoft::c_str_ptr(lpszText), stlsoft::c_str_ptr(lpszCaption));
00202 }
00203
00204 template< ss_typename_param_k S0
00205 , ss_typename_param_k S1
00206 >
00207 int MessageBox(S0 const& lpszText, S1 const& lpszCaption, UINT nType)
00208 {
00209 return parent_class_type::MessageBox(stlsoft::c_str_ptr(lpszText), stlsoft::c_str_ptr(lpszCaption), nType);
00210 }
00211
00212
00213
00214 template <ss_typename_param_k S>
00215 BOOL WinHelp(S const& lpszHelp, UINT nCmd = HELP_CONTEXT, DWORD dwData = 0)
00216 {
00217 return parent_class_type::WinHelp(stlsoft::c_str_ptr(lpszHelp), nCmd, dwData);
00218 }
00220
00223 private:
00224 Window(class_type const&);
00225 class_type& operator =(class_type const&);
00227 };
00228
00229
00230
00231 #ifndef _ATLSTL_NO_NAMESPACE
00232 # if defined(_STLSOFT_NO_NAMESPACE) || \
00233 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00234 }
00235 # else
00236 }
00237 }
00238 # endif
00239 #endif
00240
00241
00242
00243 #endif
00244
00245