Compatibility improvements

On mac, I had to change some PaintDC objects to ClientDC, but they don't
work in windows, so they are now based on operating system