Double buffering

Double buffering is a technique used to prevent flickering graphics.

In Windows each window has a bitmap used to draw on the screen. The program receives a message to redraw itself and draws on that bitmap. The flickering graphics are caused by the fact that the screen refreshes faster than the program can draw all the objects. To prevent this, the program creates another bitmap and draws on that one first. Then the program draws that bitmap on the first bitmap.