www.pudn.com > colortable.zip > Swatch.cpp


/***************************************************************************** 
*           Change Log 
*  Date     | Change 
*-----------+----------------------------------------------------------------- 
* 13-Jan-02 | Created 
*****************************************************************************/ 
// Swatch.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "Swatch.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CSwatch 
 
CSwatch::CSwatch() 
{ 
} 
 
CSwatch::~CSwatch() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CSwatch, CStatic) 
	//{{AFX_MSG_MAP(CSwatch) 
	ON_WM_ERASEBKGND() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CSwatch message handlers 
 
BOOL CSwatch::OnEraseBkgnd(CDC* pDC)  
   { 
    CRect r; 
    GetClientRect(&r); 
    pDC->FillSolidRect(&r, color); 
    return TRUE; 
}