📄 functions.h
字号:
/** \brief Adds an ANSI string to a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_addstring_a(HWND hwnd, ws_char_a_t const* s)
{
return winstl__combobox_addstring_a(hwnd, s);
}
/** \brief Adds a Unicode string to a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_addstring_w(HWND hwnd, ws_char_w_t const* s)
{
return winstl__combobox_addstring_w(hwnd, s);
}
/** \brief Adds a string to a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_addstring(HWND hwnd, ws_char_a_t const* s)
{
return winstl__combobox_addstring_a(hwnd, s);
}
/** \brief Adds a string to a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_addstring(HWND hwnd, ws_char_w_t const* s)
{
return winstl__combobox_addstring_w(hwnd, s);
}
/** \brief Adds a string to a combo-box
*
* \ingroup group__library__windows_controls
*/
template <ss_typename_param_k S>
inline ws_int_t combobox_addstring(HWND hwnd, S const& s)
{
return combobox_addstring(hwnd, stlsoft_ns_qual(c_str_ptr)(s));
}
/** \brief Inserts an ANSI string into a combo-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
{
return winstl__combobox_insertstring_a(hwnd, s, index);
}
/** \brief Inserts a Unicode string into a combo-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
{
return winstl__combobox_insertstring_w(hwnd, s, index);
}
/** \brief Inserts a string into a combo-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_insertstring(HWND hwnd, ws_char_a_t const* s, int index)
{
return winstl__combobox_insertstring_a(hwnd, s, index);
}
/** \brief Inserts a string into a combo-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_insertstring(HWND hwnd, ws_char_w_t const* s, int index)
{
return winstl__combobox_insertstring_w(hwnd, s, index);
}
/** \brief Inserts a string into a combo-box at the given index
*
* \ingroup group__library__windows_controls
*/
template <ss_typename_param_k S>
inline ws_int_t combobox_insertstring(HWND hwnd, S const& s, int index)
{
return combobox_insertstring_a(hwnd, stlsoft_ns_qual(c_str_ptr)(s), index);
}
/** \brief Gets the text length of an item in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_gettextlen(HWND hwnd, ws_int_t index)
{
return winstl__combobox_gettextlen(hwnd, index);
}
/** \brief Gets the text (in ANSI encoding) of an item in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
{
return winstl__combobox_gettext_a(hwnd, index, s);
}
/** \brief Gets the text (in Unicode encoding) of an item in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
{
return winstl__combobox_gettext_w(hwnd, index, s);
}
/** \brief Gets the text of an item in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_gettext(HWND hwnd, ws_int_t index, ws_char_a_t *s)
{
return combobox_gettext_a(hwnd, index, s);
}
/** \brief Gets the text (in Unicode encoding) of an item in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_gettext(HWND hwnd, ws_int_t index, ws_char_w_t *s)
{
return combobox_gettext_w(hwnd, index, s);
}
/** \brief Gets the number of items in a combo-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t combobox_getcount(HWND hwnd)
{
return winstl__combobox_getcount(hwnd);
}
/* LISTBOX functions
*/
/** \brief Adds an ANSI string to a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_addstring_a(HWND hwnd, ws_char_a_t const* s)
{
return winstl__listbox_addstring_a(hwnd, s);
}
/** \brief Adds a Unicode string to a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_addstring_w(HWND hwnd, ws_char_w_t const* s)
{
return winstl__listbox_addstring_w(hwnd, s);
}
/** \brief Adds a string to a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_addstring(HWND hwnd, ws_char_a_t const* s)
{
return winstl__listbox_addstring_a(hwnd, s);
}
/** \brief Adds a string to a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_addstring(HWND hwnd, ws_char_w_t const* s)
{
return winstl__listbox_addstring_w(hwnd, s);
}
/** \brief Adds a string to a list-box
*
* \ingroup group__library__windows_controls
*/
template <ss_typename_param_k S>
inline ws_int_t listbox_addstring(HWND hwnd, S const& s)
{
return listbox_addstring(hwnd, stlsoft_ns_qual(c_str_ptr)(s));
}
/** \brief Inserts an ANSI string into a list-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_insertstring_a(HWND hwnd, ws_char_a_t const* s, int index)
{
return winstl__listbox_insertstring_a(hwnd, s, index);
}
/** \brief Inserts a Unicode string into a list-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_insertstring_w(HWND hwnd, ws_char_w_t const* s, int index)
{
return winstl__listbox_insertstring_w(hwnd, s, index);
}
/** \brief Inserts a string into a list-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_insertstring(HWND hwnd, ws_char_a_t const* s, int index)
{
return winstl__listbox_insertstring_a(hwnd, s, index);
}
/** \brief Inserts a string into a list-box at the given index
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_insertstring(HWND hwnd, ws_char_w_t const* s, int index)
{
return winstl__listbox_insertstring_w(hwnd, s, index);
}
/** \brief Inserts a string into a list-box at the given index
*
* \ingroup group__library__windows_controls
*/
template <ss_typename_param_k S>
inline ws_int_t listbox_insertstring(HWND hwnd, S const& s, int index)
{
return listbox_insertstring_a(hwnd, stlsoft_ns_qual(c_str_ptr)(s), index);
}
/** \brief Gets the text length of an item in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_gettextlen(HWND hwnd, ws_int_t index)
{
return winstl__listbox_gettextlen(hwnd, index);
}
/** \brief Gets the text (in ANSI encoding) of an item in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_gettext_a(HWND hwnd, ws_int_t index, ws_char_a_t *s)
{
return winstl__listbox_gettext_a(hwnd, index, s);
}
/** \brief Gets the text (in Unicode encoding) of an item in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_gettext_w(HWND hwnd, ws_int_t index, ws_char_w_t *s)
{
return winstl__listbox_gettext_w(hwnd, index, s);
}
/** \brief Gets the text of an item in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_gettext(HWND hwnd, ws_int_t index, ws_char_a_t *s)
{
return listbox_gettext_a(hwnd, index, s);
}
/** \brief Gets the text (in Unicode encoding) of an item in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_gettext(HWND hwnd, ws_int_t index, ws_char_w_t *s)
{
return listbox_gettext_w(hwnd, index, s);
}
/** \brief Gets the number of items in a list-box
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t listbox_getcount(HWND hwnd)
{
return winstl__listbox_getcount(hwnd);
}
/** \brief Gets the number of lines in an edit-box.
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t edit_getcount(HWND hwnd)
{
return winstl__edit_getcount(hwnd);
}
/** \brief Gets the length of the line in which the given character resides.
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t edit_linelength(HWND hwnd, ws_int_t charIndex)
{
return winstl__edit_linelength(hwnd, charIndex);
}
/** \brief Gets a copy of the text of the given line.
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t edit_getline(HWND hwnd, ws_int_t lineIndex, ws_char_a_t *buffer, ws_size_t cchBuffer)
{
return winstl__edit_getline_a(hwnd, lineIndex, buffer, cchBuffer);
}
/** \brief Gets a copy of the text of the given line.
*
* \ingroup group__library__windows_controls
*/
inline ws_int_t edit_getline(HWND hwnd, ws_int_t lineIndex, ws_char_w_t *buffer, ws_size_t cchBuffer)
{
return winstl__edit_getline_w(hwnd, lineIndex, buffer, cchBuffer);
}
#endif /* __cplusplus */
/* /////////////////////////////////////////////////////////////////////////
* Unit-testing
*/
#ifdef STLSOFT_UNITTEST
# include "./unittest/functions_unittest_.h"
#endif /* STLSOFT_UNITTEST */
/* ////////////////////////////////////////////////////////////////////// */
#ifndef _WINSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} /* namespace winstl */
# else
} /* namespace winstl_project */
} /* namespace stlsoft */
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_WINSTL_NO_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
#endif /* WINSTL_INCL_WINSTL_CONTROLS_H_FUNCTIONS */
/* ////////////////////////////////////////////////////////////////////// */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -