Fixed flickering issue in custom frame code. Cleaned up some
idiosyncrasies in WindowsTitleBar and Windows in general.