Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# background_wnd_by_key Class Template Reference

background_wnd_by_key is an extension of background_wnd which allows access to the painters with keys . More...

List of all members.

## Public Types
typedef Key | key_type
typedef bg_wnd::general_exception< self, 0 > | key_already_used
typedef bg_wnd::general_exception< self, 1 > | key_invalid
typedef bg_wnd::general_exception< self, 2 > | invalid_painter_cast
## Public Member Functions
void | add_painter (const key_type &key, painter_base &painter)
template<class Painter>
void | add_painter (const key_type &key)
template<class Painter>
void | add_painter (const key_type &key, typename Painter::param0 param)
template<class Painter>
void | add_painter (const key_type &key, typename Painter::param0 param0, typename Painter::param1 param1)
void | delete_painter (const key_type &key)
void | delete_all_painters ()
painter_base & | get_painter (const key_type &key) const
template<class Painter>
Painter & | get_painter (const key_type &key) const
std::vector< key_type > | get_keys () const
void | drawing_rect (const key_type &key, const rectangle &rc)
rectangle | drawing_rect (const key_type &key) const
bool | is_painter_visible (const key_type &key) const
void | show_painter (const key_type &key, bool bVisible)
void | transparency (const key_type &key, unsigned transparency)
unsigned | transparency (const key_type &key) const
void | redraw_on_changes (bool bRedraw)
bool | redraw_on_changes () const
void | zorder_to_front (const key_type &key)
void | zorder_to_back (const key_type &key)
void | zorder_forward (const key_type &key)
void | zorder_backward (const key_type &key)
void | bk_color (COLORREF cr)
COLORREF | bk_color () const
## Protected Member Functions
bg_wnd::memory_dc & | get_mem_dc ()
const bg_wnd::memory_dc & | get_mem_dc () const

## Detailed Description

### template<class Key>
class win32::gui::background_wnd_by_key< Key >

background_wnd_by_key is an extension of background_wnd which allows access to the painters with keys .

The type of the keys is passed as a template parameter. The class has all the functions of background_wnd but instead of passing an index you must use keys.

When you add a painter you specify his key which must be unique. If it is in use a `background_wnd_by_key<Key>::key_already_used`-exception will be thrown. The same applies to member functions which take a key: if there is no painter which uses this key a `background_wnd_by_key<Key>::key_invalid`-exception will be thrown.

| by Steven Weiss. You can contact me at steven11@gmx.de.