When I draw a graph (put points) in the dialog box, about 70-80 percent is drawn, then redrawing starts from the very beginning. Then, at some point, the dialog box goes to the background, and after a while (after several redraws), the drawing ends and the dialog box comes to the foreground.
I thought that the redraw might be due to the fact that the dialog box is modal and the main application thread is blocked, and as a result, the drawing starts again. But I tried the modeless dialog as well. The result is the same
It should be noted that this behavior is observed only with a large number of drawn points. When there are few points, there are no redraws.
can anyone suggest why this behavior is observed
Thank u in advance!
What I have tried:
void CDialogGeometry::OnPaint()
{
CPaintDC dc(this);
CRect rect;
GetClientRect(&rect);
{
dc.SetPixel(x, y, RGB(0, 0, 0));
}
}