Use Invalidate() instead of Refresh(), and size the panel title bar correctly