OnAfterDrawChart not working as expected
Posted: Thu Jun 29, 2006 2:27 pm
I've just tried to use OnAfterDrawChart() and it acts strangely. I can see the test object show up but it is immediatly replaced by the stuff I just covered up, as if an invalidate has occured but without causing the OnAfterDrawChart() to be reinvoked. Why would this be? Here is the code fragment:
Thanks,
Adrian
Code: Select all
void CTest::OnAfterDrawChart()
{
CTChart & tchart = GetTChart();
CRect rect(0, 0, 300, 300);
CDC& dc = *tchart.GetDC();
dc.SelectStockObject(NULL_BRUSH);
dc.Rectangle(rect);
tchart.ReleaseDC(&dc);
}
Adrian