The following code works fine:
for(int i=0; i<500; i++) {
for(int j=0; j<100; j++) {
m_title.SetWindowText(_T("lol"));
} }
But when I set a background color for the dialog:
HBRUSH CTaggingDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) {
return CreateSolidBrush(RGB(0,0,0));//BLACK }
The 开发者_如何学JAVAloop above causes the program to hit a breakpoint in wingdi.cpp at:
CPaintDC::CPaintDC(CWnd* pWnd)
How do I set a background color for the dialog without having it crash?
Never mind. By changing the way I set the background color to the method in this article:
http://www.codeguru.com/cpp/w-d/dislog/background/article.php/c1895
The problem has been resolved.
精彩评论