1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
void window::border_paint() { //This function paints the buttons on the border according to the check procedure.
PAINTSTRUCT paint;
HDC hdc = BeginPaint(GetActiveWindow(),&paint);
draw_bitmap(hbm[0], hdc, 0, 0); //Redraws the border.
draw_bitmap(hbm[1], hdc, window_x-9, 0);
if(!buttons[0]) //Green button.
draw_bitmap(hbm[2], hdc, 1180-diff, 1);
else
draw_bitmap(hbm[3], hdc, 1180-diff, 1);
if(!buttons[1]) //Yellow button.
draw_bitmap(hbm[4], hdc, 1210-diff, 1);
else
draw_bitmap(hbm[5], hdc, 1210-diff, 1);
if(!buttons[2]) //Red button.
draw_bitmap(hbm[6], hdc, 1240-diff, 1);
else
draw_bitmap(hbm[7], hdc, 1240-diff, 1);
EndPaint(GetActiveWindow(), &paint);
}
|