By the way, your drawing code can be easily further optimized. For one, I've noticed that you are refreshing the whole "scene".
Instead, you narrow down the refreshed areat to the dirty parts. There is an Draw::IsPainting method for that. Check that out.
Also, Draw::DrawLine function can draw dashes and dots (it accepts certain patterns. You can use it to draw the rects.