www.pudn.com > Lottery.rar > MyTabel.cpp, change:2007-05-08,size:1405b


// MyTabel.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "Lottery.h" 
#include "MyTabel.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyTabel 
 
CMyTabel::CMyTabel() 
{ 
	m_font.CreateFont(-24,-20,0,0,600,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_ROMAN,""); 
} 
 
CMyTabel::~CMyTabel() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CMyTabel, CStatic) 
	//{{AFX_MSG_MAP(CMyTabel) 
	ON_WM_CREATE() 
	ON_WM_PAINT() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyTabel message handlers 
 
int CMyTabel::OnCreate(LPCREATESTRUCT lpCreateStruct)  
{ 
	if (CStatic::OnCreate(lpCreateStruct) == -1) 
		return -1; 
	 
//	this->SetFont(m_font);	 
	return 0; 
} 
 
void CMyTabel::OnPaint()  
{ 
	CPaintDC dc(this); // device context for painting 
	 
	CString str ; 
	GetWindowText(str); 
	dc.SetBkMode(TRANSPARENT); 
	dc.SetTextColor(RGB(0,0,255)); 
	dc.SelectObject(&m_font); 
	dc.TextOut(0,2,str); 
} 
 
BOOL CMyTabel::PreTranslateMessage(MSG* pMsg)  
{ 
 
	return CStatic::PreTranslateMessage(pMsg); 
} 
 
LRESULT CMyTabel::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)  
{ 
	return CStatic::DefWindowProc(message, wParam, lParam); 
}