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_CONTROLS_H_FUNCTIONS
00048 #define WINSTL_INCL_WINSTL_CONTROLS_H_FUNCTIONS
00049 
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define WINSTL_VER_WINSTL_CONTROLS_H_FUNCTIONS_MAJOR       4
00052 # define WINSTL_VER_WINSTL_CONTROLS_H_FUNCTIONS_MINOR       2
00053 # define WINSTL_VER_WINSTL_CONTROLS_H_FUNCTIONS_REVISION    3
00054 # define WINSTL_VER_WINSTL_CONTROLS_H_FUNCTIONS_EDIT        51
00055 #endif 
00056 
00057 
00058 
00059 
00060 
00061 #ifndef WINSTL_INCL_WINSTL_H_WINSTL
00062 # include <winstl/winstl.h>
00063 #endif 
00064 #ifndef WINSTL_INCL_WINSTL_WINDOW_H_MESSAGE_FUNCTIONS
00065 # include <winstl/window/message_functions.h>
00066 #endif 
00067 #ifdef __cplusplus
00068 # ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_HPP_STRING
00069 #  include <stlsoft/shims/access/string.hpp>
00070 # endif 
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 ws_int_t winstl__combobox_addstring_a(HWND hwnd, ws_char_a_t const* s)
00104 {
00105     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, CB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00106 }
00111 STLSOFT_INLINE ws_int_t winstl__combobox_addstring_w(HWND hwnd, ws_char_w_t const* s)
00112 {
00113     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, CB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00114 }
00119 STLSOFT_INLINE ws_int_t winstl__combobox_addstring(HWND hwnd, LPCTSTR s)
00120 {
00121     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, CB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00122 }
00123 
00128 STLSOFT_INLINE ws_int_t winstl__combobox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
00129 {
00130     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, CB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00131 }
00136 STLSOFT_INLINE ws_int_t winstl__combobox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
00137 {
00138     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, CB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00139 }
00144 STLSOFT_INLINE ws_int_t winstl__combobox_insertstring(HWND hwnd, LPCTSTR s, int index)
00145 {
00146     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, CB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00147 }
00148 
00153 STLSOFT_INLINE ws_int_t winstl__combobox_gettextlen(HWND hwnd, ws_int_t index)
00154 {
00155     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, CB_GETLBTEXTLEN, stlsoft_static_cast(WPARAM, index), 0L));
00156 }
00157 
00162 STLSOFT_INLINE ws_int_t winstl__combobox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00163 {
00164     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, CB_GETLBTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00165 }
00170 STLSOFT_INLINE ws_int_t winstl__combobox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00171 {
00172     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, CB_GETLBTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00173 }
00178 STLSOFT_INLINE ws_int_t winstl__combobox_gettext(HWND hwnd, ws_int_t index, LPCSTR s)
00179 {
00180     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, CB_GETLBTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00181 }
00182 
00187 STLSOFT_INLINE ws_dword_t winstl__combobox_getitemdata(HWND hwnd, ws_int_t index)
00188 {
00189     return stlsoft_static_cast(ws_dword_t, winstl__SendMessage(hwnd, CB_GETITEMDATA, stlsoft_static_cast(WPARAM, index), 0L));
00190 }
00191 
00196 STLSOFT_INLINE ws_int_t winstl__combobox_getcount(HWND hwnd)
00197 {
00198     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, CB_GETCOUNT, 0, 0L));
00199 }
00200 
00201 
00202 
00203 
00204 
00209 STLSOFT_INLINE ws_int_t winstl__listbox_addstring_a(HWND hwnd, ws_char_a_t const* s)
00210 {
00211     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, LB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00212 }
00217 STLSOFT_INLINE ws_int_t winstl__listbox_addstring_w(HWND hwnd, ws_char_w_t const* s)
00218 {
00219     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, LB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00220 }
00225 STLSOFT_INLINE ws_int_t winstl__listbox_addstring(HWND hwnd, LPCTSTR s)
00226 {
00227     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, LB_ADDSTRING, 0, stlsoft_reinterpret_cast(LPARAM, s)));
00228 }
00229 
00234 STLSOFT_INLINE ws_int_t winstl__listbox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
00235 {
00236     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, LB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00237 }
00242 STLSOFT_INLINE ws_int_t winstl__listbox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
00243 {
00244     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, LB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00245 }
00250 STLSOFT_INLINE ws_int_t winstl__listbox_insertstring(HWND hwnd, LPCTSTR s, int index)
00251 {
00252     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, LB_INSERTSTRING, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00253 }
00254 
00259 STLSOFT_INLINE ws_int_t winstl__listbox_gettextlen(HWND hwnd, ws_int_t index)
00260 {
00261     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, LB_GETTEXTLEN, stlsoft_static_cast(WPARAM, index), 0L));
00262 }
00263 
00268 STLSOFT_INLINE ws_int_t winstl__listbox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00269 {
00270     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, LB_GETTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00271 }
00276 STLSOFT_INLINE ws_int_t winstl__listbox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00277 {
00278     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, LB_GETTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00279 }
00284 STLSOFT_INLINE ws_int_t winstl__listbox_gettext(HWND hwnd, ws_int_t index, LPCSTR s)
00285 {
00286     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, LB_GETTEXT, stlsoft_static_cast(WPARAM, index), stlsoft_reinterpret_cast(LPARAM, s)));
00287 }
00288 
00293 STLSOFT_INLINE ws_dword_t winstl__listbox_getitemdata(HWND hwnd, ws_int_t index)
00294 {
00295     return stlsoft_static_cast(ws_dword_t, winstl__SendMessage(hwnd, LB_GETITEMDATA, stlsoft_static_cast(WPARAM, index), 0L));
00296 }
00297 
00302 STLSOFT_INLINE ws_int_t winstl__listbox_getcount(HWND hwnd)
00303 {
00304     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, LB_GETCOUNT, 0, 0L));
00305 }
00306 
00311 STLSOFT_INLINE ws_int_t winstl__edit_getcount(HWND hwnd)
00312 {
00313     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, EM_GETLINECOUNT, 0, 0L));
00314 }
00315 
00320 STLSOFT_INLINE ws_int_t winstl__edit_linelength(HWND hwnd, ws_int_t charIndex)
00321 {
00322     return stlsoft_static_cast(ws_int_t, winstl__SendMessage(hwnd, EM_LINELENGTH, stlsoft_static_cast(WPARAM, charIndex), 0L));
00323 }
00324 
00329 STLSOFT_INLINE ws_int_t winstl__edit_getline_a(HWND hwnd, ws_int_t lineIndex, ws_char_a_t *buffer, ws_size_t cchBuffer)
00330 {
00331     WINSTL_ASSERT(NULL != buffer);
00332 
00333     *stlsoft_reinterpret_cast(int*, buffer) = stlsoft_static_cast(int, cchBuffer);
00334 
00335     return stlsoft_static_cast(ws_int_t, winstl__SendMessageA(hwnd, EM_GETLINE, stlsoft_static_cast(WPARAM, lineIndex), stlsoft_reinterpret_cast(LPARAM, buffer)));
00336 }
00337 
00342 STLSOFT_INLINE ws_int_t winstl__edit_getline_w(HWND hwnd, ws_int_t lineIndex, ws_char_w_t *buffer, ws_size_t cchBuffer)
00343 {
00344     WINSTL_ASSERT(NULL != buffer);
00345 
00346     *stlsoft_reinterpret_cast(int*, buffer) = stlsoft_static_cast(int, cchBuffer);
00347 
00348     return stlsoft_static_cast(ws_int_t, winstl__SendMessageW(hwnd, EM_GETLINE, stlsoft_static_cast(WPARAM, lineIndex), stlsoft_reinterpret_cast(LPARAM, buffer)));
00349 }
00350 
00351 
00352 
00353 
00354 
00355 #ifdef STLSOFT_DOCUMENTATION_SKIP_SECTION
00356 namespace winstl
00357 {
00358 #endif 
00359 
00360 
00361 
00362 
00363 
00364 #ifdef __cplusplus
00365 
00366 
00367 
00368 
00373 inline ws_int_t combobox_addstring_a(HWND hwnd, ws_char_a_t const* s)
00374 {
00375     return winstl__combobox_addstring_a(hwnd, s);
00376 }
00377 
00382 inline ws_int_t combobox_addstring_w(HWND hwnd, ws_char_w_t const* s)
00383 {
00384     return winstl__combobox_addstring_w(hwnd, s);
00385 }
00386 
00391 inline ws_int_t combobox_addstring(HWND hwnd, ws_char_a_t const* s)
00392 {
00393     return winstl__combobox_addstring_a(hwnd, s);
00394 }
00399 inline ws_int_t combobox_addstring(HWND hwnd, ws_char_w_t const* s)
00400 {
00401     return winstl__combobox_addstring_w(hwnd, s);
00402 }
00407 template <ss_typename_param_k S>
00408 inline ws_int_t combobox_addstring(HWND hwnd, S const& s)
00409 {
00410     return combobox_addstring(hwnd, stlsoft_ns_qual(c_str_ptr)(s));
00411 }
00412 
00417 inline ws_int_t combobox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
00418 {
00419     return winstl__combobox_insertstring_a(hwnd, s, index);
00420 }
00421 
00426 inline ws_int_t combobox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
00427 {
00428     return winstl__combobox_insertstring_w(hwnd, s, index);
00429 }
00430 
00435 inline ws_int_t combobox_insertstring(HWND hwnd, ws_char_a_t const* s, int index)
00436 {
00437     return winstl__combobox_insertstring_a(hwnd, s, index);
00438 }
00443 inline ws_int_t combobox_insertstring(HWND hwnd, ws_char_w_t const* s, int index)
00444 {
00445     return winstl__combobox_insertstring_w(hwnd, s, index);
00446 }
00451 template <ss_typename_param_k S>
00452 inline ws_int_t combobox_insertstring(HWND hwnd, S const& s, int index)
00453 {
00454     return combobox_insertstring_a(hwnd, stlsoft_ns_qual(c_str_ptr)(s), index);
00455 }
00456 
00461 inline ws_int_t combobox_gettextlen(HWND hwnd, ws_int_t index)
00462 {
00463     return winstl__combobox_gettextlen(hwnd, index);
00464 }
00465 
00470 inline ws_int_t combobox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00471 {
00472     return winstl__combobox_gettext_a(hwnd, index, s);
00473 }
00478 inline ws_int_t combobox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00479 {
00480     return winstl__combobox_gettext_w(hwnd, index, s);
00481 }
00486 inline ws_int_t combobox_gettext(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00487 {
00488     return combobox_gettext_a(hwnd, index, s);
00489 }
00494 inline ws_int_t combobox_gettext(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00495 {
00496     return combobox_gettext_w(hwnd, index, s);
00497 }
00498 
00503 inline ws_dword_t combobox_getitemdata(HWND hwnd, ws_int_t index)
00504 {
00505     return winstl__combobox_getitemdata(hwnd, index);
00506 }
00507 
00512 inline ws_int_t combobox_getcount(HWND hwnd)
00513 {
00514     return winstl__combobox_getcount(hwnd);
00515 }
00516 
00517 
00518 
00519 
00520 
00525 inline ws_int_t listbox_addstring_a(HWND hwnd, ws_char_a_t const* s)
00526 {
00527     return winstl__listbox_addstring_a(hwnd, s);
00528 }
00529 
00534 inline ws_int_t listbox_addstring_w(HWND hwnd, ws_char_w_t const* s)
00535 {
00536     return winstl__listbox_addstring_w(hwnd, s);
00537 }
00538 
00543 inline ws_int_t listbox_addstring(HWND hwnd, ws_char_a_t const* s)
00544 {
00545     return winstl__listbox_addstring_a(hwnd, s);
00546 }
00551 inline ws_int_t listbox_addstring(HWND hwnd, ws_char_w_t const* s)
00552 {
00553     return winstl__listbox_addstring_w(hwnd, s);
00554 }
00559 template <ss_typename_param_k S>
00560 inline ws_int_t listbox_addstring(HWND hwnd, S const& s)
00561 {
00562     return listbox_addstring(hwnd, stlsoft_ns_qual(c_str_ptr)(s));
00563 }
00564 
00569 inline ws_int_t listbox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
00570 {
00571     return winstl__listbox_insertstring_a(hwnd, s, index);
00572 }
00573 
00578 inline ws_int_t listbox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
00579 {
00580     return winstl__listbox_insertstring_w(hwnd, s, index);
00581 }
00582 
00587 inline ws_int_t listbox_insertstring(HWND hwnd, ws_char_a_t const* s, int index)
00588 {
00589     return winstl__listbox_insertstring_a(hwnd, s, index);
00590 }
00595 inline ws_int_t listbox_insertstring(HWND hwnd, ws_char_w_t const* s, int index)
00596 {
00597     return winstl__listbox_insertstring_w(hwnd, s, index);
00598 }
00603 template <ss_typename_param_k S>
00604 inline ws_int_t listbox_insertstring(HWND hwnd, S const& s, int index)
00605 {
00606     return listbox_insertstring_a(hwnd, stlsoft_ns_qual(c_str_ptr)(s), index);
00607 }
00608 
00613 inline ws_int_t listbox_gettextlen(HWND hwnd, ws_int_t index)
00614 {
00615     return winstl__listbox_gettextlen(hwnd, index);
00616 }
00617 
00622 inline ws_int_t listbox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00623 {
00624     return winstl__listbox_gettext_a(hwnd, index, s);
00625 }
00630 inline ws_int_t listbox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00631 {
00632     return winstl__listbox_gettext_w(hwnd, index, s);
00633 }
00638 inline ws_int_t listbox_gettext(HWND hwnd, ws_int_t index, ws_char_a_t *s)
00639 {
00640     return listbox_gettext_a(hwnd, index, s);
00641 }
00646 inline ws_int_t listbox_gettext(HWND hwnd, ws_int_t index, ws_char_w_t *s)
00647 {
00648     return listbox_gettext_w(hwnd, index, s);
00649 }
00650 
00655 inline ws_dword_t listbox_getitemdata(HWND hwnd, ws_int_t index)
00656 {
00657     return winstl__listbox_getitemdata(hwnd, index);
00658 }
00659 
00664 inline ws_int_t listbox_getcount(HWND hwnd)
00665 {
00666     return winstl__listbox_getcount(hwnd);
00667 }
00668 
00669 
00674 inline ws_int_t edit_getcount(HWND hwnd)
00675 {
00676     return winstl__edit_getcount(hwnd);
00677 }
00678 
00683 inline ws_int_t edit_linelength(HWND hwnd, ws_int_t charIndex)
00684 {
00685     return winstl__edit_linelength(hwnd, charIndex);
00686 }
00687 
00692 inline ws_int_t edit_getline(HWND hwnd, ws_int_t lineIndex, ws_char_a_t *buffer, ws_size_t cchBuffer)
00693 {
00694     return winstl__edit_getline_a(hwnd, lineIndex, buffer, cchBuffer);
00695 }
00696 
00701 inline ws_int_t edit_getline(HWND hwnd, ws_int_t lineIndex, ws_char_w_t *buffer, ws_size_t cchBuffer)
00702 {
00703     return winstl__edit_getline_w(hwnd, lineIndex, buffer, cchBuffer);
00704 }
00705 
00706 #endif 
00707 
00708 
00709 
00710 
00711 
00712 #ifdef STLSOFT_UNITTEST
00713 # include "./unittest/functions_unittest_.h"
00714 #endif 
00715 
00716 
00717 
00718 #ifndef _WINSTL_NO_NAMESPACE
00719 # if defined(_STLSOFT_NO_NAMESPACE) || \
00720      defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00721 } 
00722 # else
00723 } 
00724 } 
00725 # endif 
00726 #endif 
00727 
00728 
00729 
00730 #endif 
00731 
00732