class WinMaker {
public:
WinMaker (WinClass* winClass) : /* stuff */ { }
void AddStyle (DWORD s) { style |= s; }
/* Other methods */
void Create();
virtual void Paint (HDC hDC) { }
protected:
/* Member-data */
};
class BitmappedWinMaker : public WinMaker {
public:
/* BitmappedWinMaker is a windows-class that supports
blitting bitmaps to the window */
BitmappedWinMaker (WinClass* winClass) : WinMaker(winClass), /* other stuff */ { }
void LoadBitmapFromFile (const char* szFilename);
void Paint (HDC hDC) {
BitBlt (hDC, 0, 0, width, height, dcSkin, 0, 0, SRCCOPY);
}
protected:
HBITMAP hBitmap;
HDC dcSkin;
};
class RegionedWinMaker : public WinMaker {
public:
/* RegionedWinMaker has support for creating window-regions
for oddly shaped windows */
RegionedWinMaker (WinClass* winClass) : WinMaker(winClass), /* other stuff */ { }
void LoadRegionFromFile (const char* szFilename);
protected:
HRGN hRegion;
};
class SkinnedWinMaker : public BitmappedWinMaker, public RegionedWinMaker {
public:
SkinnedWinMaker (WinClass* winClass) : WinMaker(winClass) { }
};