Determine window dimensions based on client area instead of hardcoded va...

...lues.

This also fixes a bug I experienced in Windows 8.1 64-bit wherein the drawn image extended past the edge of the window bounds. For example, the right and bottom scroll bars were not completely visible.