Autoredraw is the correct solution if you use drawing methods like bitblt, setpixelv or lineto and other apis, you use refresh method to refresh the drawings.