Changed panning method.
Use ATL, not the depricated pan method (which causes flickering)