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
00047 #ifndef WINSTL_INCL_WINSTL_CONTROL_H_CREATION_FUNCTIONS
00048 #define WINSTL_INCL_WINSTL_CONTROL_H_CREATION_FUNCTIONS
00049
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define WINSTL_VER_WINSTL_CONTROL_H_CREATION_FUNCTIONS_MAJOR 2
00052 # define WINSTL_VER_WINSTL_CONTROL_H_CREATION_FUNCTIONS_MINOR 0
00053 # define WINSTL_VER_WINSTL_CONTROL_H_CREATION_FUNCTIONS_REVISION 4
00054 # define WINSTL_VER_WINSTL_CONTROL_H_CREATION_FUNCTIONS_EDIT 22
00055 #endif
00056
00057
00058
00059
00060
00061 #ifndef WINSTL_INCL_WINSTL_H_WINSTL
00062 # include <winstl/winstl.h>
00063 #endif
00064 #ifdef __cplusplus
00065 # ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00066 # include <stlsoft/shims/access/string/fwd.h>
00067 # endif
00068 #endif
00069 #ifndef WINSTL_INCL_WINSTL_WINDOW_H_CREATION_FUNCTIONS
00070 # include <winstl/window/creation_functions.h>
00071 #endif
00072
00073
00074
00075
00076
00077 #if !defined(_WINSTL_NO_NAMESPACE) && \
00078 !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00079 # if defined(_STLSOFT_NO_NAMESPACE)
00080
00081 namespace winstl
00082 {
00083 # else
00084
00085
00086 namespace stlsoft
00087 {
00088
00089 namespace winstl_project
00090 {
00091
00092 # endif
00093 #endif
00094
00095
00096
00097
00098
00103 STLSOFT_INLINE void winstl__setchildfont_(HWND hwnd, HWND hwndParent)
00104 {
00105 STLSOFT_SUPPRESS_UNUSED(hwnd);
00106 STLSOFT_SUPPRESS_UNUSED(hwndParent);
00107
00108
00109 }
00110
00115 STLSOFT_INLINE HWND winstl__CreateStaticA(HWND hwndParent, ws_char_a_t const* name, int x, int y, int cx, int cy, int id)
00116 {
00117 HWND hwnd = winstl__CreateWindowA("STATIC", name, WS_CHILD | WS_VISIBLE, x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00118
00119 winstl__setchildfont_(hwnd, hwndParent);
00120
00121 return hwnd;
00122 }
00123
00128 STLSOFT_INLINE HWND winstl__CreateStaticW(HWND hwndParent, ws_char_w_t const* name, int x, int y, int cx, int cy, int id)
00129 {
00130 HWND hwnd = winstl__CreateWindowW(L"STATIC", name, WS_CHILD | WS_VISIBLE, x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00131
00132 winstl__setchildfont_(hwnd, hwndParent);
00133
00134 return hwnd;
00135 }
00136
00141 STLSOFT_INLINE HWND winstl__CreateStaticFrame(HWND hwndParent, DWORD frameStyle, int x, int y, int cx, int cy, int id)
00142 {
00143 HWND hwnd;
00144
00145 WINSTL_ASSERT(SS_BLACKFRAME == frameStyle || SS_GRAYFRAME == frameStyle || SS_WHITEFRAME == frameStyle || SS_ETCHEDFRAME == frameStyle);
00146
00147 hwnd = winstl__CreateWindowA("STATIC", "", WS_CHILD | WS_VISIBLE | frameStyle, x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00148
00149 winstl__setchildfont_(hwnd, hwndParent);
00150
00151 return hwnd;
00152 }
00153
00158 STLSOFT_INLINE HWND winstl__CreateEditA(HWND hwndParent, ws_char_a_t const* text, DWORD editStyle, int x, int y, int cx, int cy, int id)
00159 {
00160 return winstl__CreateWindowA("EDIT", text, WS_CHILD | WS_VISIBLE | WS_TABSTOP | (0xFFFF & editStyle), x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00161 }
00162
00167 STLSOFT_INLINE HWND winstl__CreateEditW(HWND hwndParent, ws_char_w_t const* text, DWORD editStyle, int x, int y, int cx, int cy, int id)
00168 {
00169 return winstl__CreateWindowW(L"EDIT", text, WS_CHILD | WS_VISIBLE | WS_TABSTOP | (0xFFFF & editStyle), x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00170 }
00171
00176 STLSOFT_INLINE HWND winstl__CreateCheckboxA(HWND hwndParent, ws_char_a_t const* name, DWORD buttonStyle, int x, int y, int cx, int cy, int id)
00177 {
00178 return winstl__CreateWindowA("BUTTON", name, WS_CHILD | WS_VISIBLE | WS_TABSTOP | (0xFFFF & buttonStyle), x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00179 }
00180
00185 STLSOFT_INLINE HWND winstl__CreateCheckboxW(HWND hwndParent, ws_char_w_t const* name, DWORD buttonStyle, int x, int y, int cx, int cy, int id)
00186 {
00187 return winstl__CreateWindowW(L"BUTTON", name, WS_CHILD | WS_VISIBLE | WS_TABSTOP | (0xFFFF & buttonStyle), x, y, cx, cy, hwndParent, stlsoft_reinterpret_cast(HMENU, id), NULL, NULL);
00188 }
00189
00190
00191
00192
00193
00194
00195 #ifdef STLSOFT_DOCUMENTATION_SKIP_SECTION
00196 namespace winstl
00197 {
00198 #endif
00199
00200
00201
00202
00203
00204 #ifdef __cplusplus
00205
00210 inline HWND winstl__CreateStatic(HWND hwndParent, ws_char_a_t const* name, int x, int y, int cx, int cy, int id)
00211 {
00212 return winstl__CreateStaticA(hwndParent, name, x, y, cx, cy, id);
00213 }
00214
00219 inline HWND winstl__CreateStatic(HWND hwndParent, ws_char_w_t const* name, int x, int y, int cx, int cy, int id)
00220 {
00221 return winstl__CreateStaticW(hwndParent, name, x, y, cx, cy, id);
00222 }
00223
00224
00229 inline HWND winstl__CreateEdit(HWND hwndParent, ws_char_a_t const* text, DWORD editStyle, int x, int y, int cx, int cy, int id)
00230 {
00231 return winstl__CreateEditA(hwndParent, text, editStyle, x, y, cx, cy, id);
00232 }
00233
00238 inline HWND winstl__CreateEdit(HWND hwndParent, ws_char_w_t const* text, DWORD editStyle, int x, int y, int cx, int cy, int id)
00239 {
00240 return winstl__CreateEditW(hwndParent, text, editStyle, x, y, cx, cy, id);
00241 }
00242
00243
00248 inline HWND winstl__CreateCheckbox(HWND hwndParent, ws_char_a_t const* name, DWORD buttonStyle, int x, int y, int cx, int cy, int id)
00249 {
00250 return winstl__CreateCheckboxA(hwndParent, name, buttonStyle, x, y, cx, cy, id);
00251 }
00252
00257 inline HWND winstl__CreateCheckbox(HWND hwndParent, ws_char_w_t const* name, DWORD buttonStyle, int x, int y, int cx, int cy, int id)
00258 {
00259 return winstl__CreateCheckboxW(hwndParent, name, buttonStyle, x, y, cx, cy, id);
00260 }
00261
00262
00267 template <ss_typename_param_k S>
00268 inline HWND CreateStatic(HWND hwndParent, S const& name, int x, int y, int cx, int cy, int id)
00269 {
00270 return winstl__CreateStatic(hwndParent, stlsoft_ns_qual(c_str_ptr)(name), x, y, cx, cy, id);
00271 }
00272
00277 template <ss_typename_param_k S>
00278 inline HWND CreateStatic(HWND hwndParent, S const& name, RECT const& rc, int id)
00279 {
00280 return winstl__CreateStatic(hwndParent, stlsoft_ns_qual(c_str_ptr)(name), rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), id);
00281 }
00282
00283
00288 template <ss_typename_param_k S>
00289 inline HWND CreateEdit(HWND hwndParent, S const& text, DWORD editStyle, int x, int y, int cx, int cy, int id)
00290 {
00291 return winstl__CreateEdit(hwndParent, stlsoft_ns_qual(c_str_ptr)(text), editStyle, x, y, cx, cy, id);
00292 }
00293
00298 template <ss_typename_param_k S>
00299 inline HWND CreateEdit(HWND hwndParent, S const& text, DWORD editStyle, RECT const& rc, int id)
00300 {
00301 return winstl__CreateEdit(hwndParent, stlsoft_ns_qual(c_str_ptr)(text), editStyle, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), id);
00302 }
00303
00304
00309 inline HWND CreateStaticFrame(HWND hwndParent, DWORD frameStyle, int x, int y, int cx, int cy, int id = -1)
00310 {
00311 return winstl__CreateStaticFrame(hwndParent, frameStyle, x, y, cx, cy, id);
00312 }
00313
00318 inline HWND CreateStaticFrame(HWND hwndParent, DWORD frameStyle, RECT const& rc, int id = -1)
00319 {
00320 return CreateStaticFrame(hwndParent, frameStyle, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), id);
00321 }
00322
00327 template <ss_typename_param_k S>
00328 inline HWND CreateCheckbox(HWND hwndParent, S const& name, DWORD buttonStyle, int x, int y, int cx, int cy, int id)
00329 {
00330 return winstl__CreateCheckbox(hwndParent, stlsoft_ns_qual(c_str_ptr)(name), buttonStyle, x, y, cx, cy, id);
00331 }
00332
00337 template <ss_typename_param_k S>
00338 inline HWND CreateCheckbox(HWND hwndParent, S const& name, DWORD buttonStyle, RECT const& rc, int id)
00339 {
00340 return winstl__CreateCheckbox(hwndParent, stlsoft_ns_qual(c_str_ptr)(name), buttonStyle, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), id);
00341 }
00342
00343 #endif
00344
00345
00346
00347 #ifndef _WINSTL_NO_NAMESPACE
00348 # if defined(_STLSOFT_NO_NAMESPACE) || \
00349 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00350 }
00351 # else
00352 }
00353 }
00354 # endif
00355 #endif
00356
00357
00358
00359 #endif
00360
00361