What is the proper way to get draw area size and screen resolution?

Certainly related to

but for now no solution