Skip to content

Commit e19605c

Browse files
committed
Fixed WindowRectOp bug doing flood fills
1 parent bb31246 commit e19605c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

miniwindow.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,23 @@ long CMiniWindow::RectOp (short Action, long Left, long Top, long Right, long B
314314

315315
case 6: // Flood fill border
316316
{
317+
// create brush for fill colour
318+
CBrush br;
319+
br.CreateSolidBrush (Colour2);
320+
CBrush* oldBrush = dc.SelectObject(&br);
317321
dc.FloodFill (Left, Top, Colour1);
322+
dc.SelectObject (oldBrush);
318323
break;
319324
}
320325

321326
case 7: // Flood fill surface
322327
{
328+
// create brush for fill colour
329+
CBrush br;
330+
br.CreateSolidBrush (Colour2);
331+
CBrush* oldBrush = dc.SelectObject(&br);
323332
dc.ExtFloodFill (Left, Top, Colour1, FLOODFILLSURFACE);
333+
dc.SelectObject (oldBrush);
324334
break;
325335
}
326336

0 commit comments

Comments
 (0)