I'm not sure how to get the code I'm using to work. I need to add two separate rectangles to the
code already prepared, but it won't compile. The relevant code follows, so please help!
hdc = BeginPaint(hwnd,&ps);
// obtain a yellow pen for drawing walls of container in yellow
pen = CreatePen(PS_SOLID,4, RGB(255,255,0));
// obtain a black bruch to draw 'background' of container in black
blackBrush = CreateSolidBrush(RGB(0,0,0));
// draw container and its walls
//draw the orifices (most relevant)
pen2 = CreatePen(PS_SOLID, 4, RGB(255, 255, 0));
brush = CreateSolidBrush(RGB(255,255,0));
Rectangle(hdc, Mid - 1, 0, Mid, 380);
pen3 = CreatePen(PS_SOLID, 4, RGB(255,255, 0));
brush2 = CreateSolidBrush(RGB(255,255,0));
// draw ball objects at their initial locations in yellow
for(j = 0; j <= 19; j++)
// Drawing a rectangle with the current Device Context
// Changing the color of the brush to Green
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.