Get screen resolution

Hi
I'm looking for a method to find out the users screen resolution when starting the program.
Anyone have any ideas about how to find this out?
Thanks
// Lasse
[196 byte] By [Lazze] at [2007-11-20 11:43:22]
# 1 Re: Get screen resolution
You can call GetDeviceCaps(), but the figures are not always reliable on some systems. So, I prefer to use the two lines below, that give you the size of the screen in pixels.
RECT rc;
GetWindowRect(GetDesktopWindow(), &rc);
olivthill at 2007-11-9 13:33:00 >
# 2 Re: Get screen resolution
Work perfectly, thanks!
Lazze at 2007-11-9 13:33:59 >
# 3 Re: Get screen resolution
const long nScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
const long nScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
JamesSchumacher at 2007-11-9 13:34:57 >