August 01, 2003
Generalized String Manipulation: Access Shims and Type Tunneling
Listing 9: WinSTL's listbox_add_inserter function object
Listing 9: WinSTL's listbox_add_inserter function object
/* /////////////////////////////////////////////////////////////
* Extract from winstl_control_functionals.h
*
* www: http://winstl.org/
*
* Copyright (C) 2002, Synesis Software Pty Ltd.
* (Licensed under the Synesis Software Standard Source License:
* http://www.synesis.com.au/licenses/ssssl.html)
* ////////////////////////////////////////////////////////// */
namespace winstl
{
struct listbox_add_inserter
{
public:
explicit listbox_add_inserter(HWND hwndListbox)
: m_hwndListbox(hwndListbox)
{}
template <typename S>
void operator ()(S &s)
{
ListBox_AddString(m_hwndListbox, c_str_ptr(s));
}
protected:
HWND m_hwndListbox;
};
} // namespace winstl
Previous Page |
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
Next Page