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

## Introduction

background_wnd is a generic mix-in class for the great Win32GUI Lib by John Torjo. Steven Weiss has the full copyright but you can use and modify the code as long as the copyright comment persists.
background_wnd facilitates the task of painting the background of a window. Because there is no default painting (except for a background color) you can add so-called painters to the background_wnd. A painter performs the actual painting on a DC and must be derived from painter_base. This concept results in a separation of the drawing-logic from the window-logic. background_wnd takes care of managing a memory-dc, holding the painters, effective drawing, ... so you can concentrate on creating cool painters ;-)
You have many possibilities to manipulate the painters and their appearance: You can change the Z-Order and transparency of the painters, set the rectangle in which they appear, add and remove painters ... With these possibilities you can compare the painters to layers or sprites in a graphic program.
At the moment there are two window classes: background_wnd and background_wnd_by_key. The latter is based on the former and adds the possibility to access a painter through a unique key (the type of the key is passed as a template parameter).

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