1 OnCtlColorHBRUSH CXxxxxxxDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_EDIT1)
{
pDC->SetTextColor(RGB(255,8,0));//
COLORREF COLOR=RGB(183,234,0);
pDC->SetBkColor(COLOR);
flag = TRUE;
return CreateSolidBrush(COLOR);
} // TODO: Return a different brush if the default is not desired
return hbr;
}void CXxxxxxxDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
ReadNotes();
iCount++; CDialog::OnTimer(nIDEvent);
} CString strMsg;
srand((unsigned)time( NULL ));
int g = rand();
strMsg.Format("%s,%d,%d", "中国网谁赛法纪科学,发发非阿嘎阿",iCount,g);
m_notes = strMsg;
UpdateData(FALSE);SetTimer(100,10,NULL);
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_EDIT1)
{
pDC->SetTextColor(RGB(255,8,0));//
COLORREF COLOR=RGB(183,234,0);
pDC->SetBkColor(COLOR);
flag = TRUE;
return CreateSolidBrush(COLOR);
} // TODO: Return a different brush if the default is not desired
return hbr;
}void CXxxxxxxDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
ReadNotes();
iCount++; CDialog::OnTimer(nIDEvent);
} CString strMsg;
srand((unsigned)time( NULL ));
int g = rand();
strMsg.Format("%s,%d,%d", "中国网谁赛法纪科学,发发非阿嘎阿",iCount,g);
m_notes = strMsg;
UpdateData(FALSE);SetTimer(100,10,NULL);
解决方案 »
- 散分~~~~~~~~~~~~~
- 我的VC++6.0工程怎么怪怪的,选择Release版本编译一个错误都没有,但选择Debug版本编译很多错误,怪怪!
- 简单的vc
- 关于用COM生成excel文件的问题
- 高手救命,关于汉字矢量坐标的问题
- 怎么管理多个模板?在哪里选择?
- 为什么使用EnumPrinters总是不能得到系统中的打印机啊?使用GetDefaultPrinter就可以得到正确的打印机名称。。。
- 视频捕捉的时间
- 使用ADO怎样访问数据库?????
- ---------- 3389肉鸡谁有!!!!!!!!!!!!!!!!!!!!!!!!!!!! ---------(打搜购)
- 大侠救急, vc编译好的程序不能运行, 出现如下错误:
- 如何获取其他程序窗口中的内容?如何控制其他程序的窗口?
{
CString strMsg;
srand((unsigned)time( NULL ));
int g = rand();
strMsg.Format("%s,%d,%d", "中国网谁赛法纪科学,发发非阿嘎阿",iCount,g);
m_notes = strMsg;
UpdateData(FALSE);}
return CreateSolidBrush需要修改应该始终保持一个Brush,而不是每刷新一次数据就创建一个Brush