关于MFC日期时间显示闪烁的有关问题

关于MFC日期时间显示闪烁的问题
我在主界面下增加一个时间控件Date,控件ID:IDC_DATE,关联变量m_fDate。初始化程序如下:
//年、月、日、星期
m_fDate.MoveWindow(15,370,150,75);
m_fDate.SetFontSize(25);
m_fDate.SetFontStatic(_T("Frutiger Linotype"));
m_fDate.SetAlignment(CFontStatic::FS_CENTER);
m_fDate.SetBkgndHandle(m_hBmBkgnd);
m_fDate.SetTransparent(TRUE);
m_fDate.SetForeground(255, 255, 255);
编写的显示时间的程序:
void CAPF_PC_SoftwareDlg::DisplayTime()
{
//CString sWeek;

CTime nowtime=CTime::GetCurrentTime();
int iYear=nowtime.GetYear();
int iMonth=nowtime.GetMonth();
int iDay=nowtime.GetDay();
int iHour=nowtime.GetHour();
int iMinute=nowtime.GetMinute();
int iSecond=nowtime.GetSecond();
CString tempDate; 
tempDate.Format(_T("%d年\n%d月%2d日\n"),iYear,iMonth,iDay);
int is1,is2,im1,im2;
is1=iSecond/10;
is2=iSecond%10;
im1=iMinute/10;
im2=iMinute%10;关于MFC日期时间显示闪烁的有关问题
m_sTime.Format(_T("%2d:%d%d:%d%d"),iHour,im1,im2,is1,is2);
tempDate+=m_sTime;
m_sDate=tempDate;
m_fDate.SetForeground(255, 255, 255);
m_fDate.SetWindowText(m_sDate);
UpdateData(FALSE);        
}
编译运行后显示界面背景老有一块灰白色的矩形框(框内有黑色小字体的时间显示在闪烁)。我修改初始化定时器时间也只能改变闪烁的频率,不能消除闪烁。

------解决方案--------------------
双缓冲绘图,同时注意重载OnEraser那个函数,将return TRUE;注释掉,返回空画刷,绝对不闪屏。