Advertisement

WinGDI Fill color

Started by March 04, 2000 02:56 PM
0 comments, last by BeanDog 24 years, 8 months ago
How do you set the fill color for GDI calls like Ellipse and things?
You need to select a brush.

HDC DC;int Left, Top, Right, Bottom;BYTE Red, Green, Blue;// Create and select the brushHBRUSH Brush = CreateSolidBrush((Red<<16)/(Green<<8)/Blue);HBRUSH Old = SelectObject(DC, Brush);// Do some drawingEllipse(DC, Left, Top, Right, Bottom);// Restore old brush before deleting the previously created brushSelectObject(DC, Old);DeleteObject(Brush); 


Edited by - Spellbound on 3/4/00 4:11:11 PM

This topic is closed to new replies.

Advertisement