what is difference between

BeginPaint()
EndPaint()

and

GetDC()
ReleaseDC()

I am getting problem with this.
While using beginpaint and end paint is works well but in another
the objects drawn are flicker.