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 loop 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?