some fixes that allowed to with stand writing tests
CWindow now have boundaries to limit scrolling