animation

I am attempting to animate a pong clone paddle, it works but it flickers when it moves ,help please I am trying to use the swapbuffers command

Have you enabled doublebuffering ?

In windows you might have incorrect WM_ERASEBKGND behavior, (return TRUE to avoid background erasing, otherwise it will flicker).