Question

In MFC: If I use CBrush like "CBrush brush; CDC* pDC = GetDC();pDC->Ellipse(start.x,start.y,end.x,end.y);", what color of the ellipse's interior will be?

Was it helpful?

Solution

You're not using the brush or assigning it anything; it's simply a variable declaration. It serves absolutely no purpose, so you'd see whatever color was set for the brush in pDC.

If you've done nothing to change it, the interior of the ellipsis will be whatever the default background color is for the device context in pDC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top