Get desktop information (width, height, depth, etc.)

I want to try my hand at graphics programming, but I hate writing GUIs. For some reason, thought, the idea of writing a GUI library sounds interesting, so I'm going to try it (with SVGs, so I'll get some experience with those, too). Anyway, I don't want it just to work on X, and anyway, I'm stuck on windows for now, so I'm going to write some of the windows version first.

Anyway, what I wanted to know what how to get information about the desktop, e.g. size, width, height, depth, etc. I found an msdn thing on it, but it was all visual basic, which I'm not using. Can someone point me to an article (preferably using a URL and not a memory reference) that describes some functions I can use for this kind of thing (I don't really want direct links to desktop dimensions, because I want to get as much information about the desktop as possible).

I found this: http://msdn.microsoft.com/en-us/library/aa969540%28VS.85%29.aspx but it didn't seem relevant.
closed account (z05DSL3A)
GetSystemMetrics Function
http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx
Oh, thanks. That has more than I needed, but it doesn't mention colour depth. How can I get the colour depth?
Last edited on
closed account (z05DSL3A)
How can I get the colour depth?
GetDeviceCaps Function may do what you want.
http://msdn.microsoft.com/en-us/library/dd144877(VS.85).aspx
BITSPIXEL Number of adjacent color bits for each pixel.

That should be ok. Thank you.
Topic archived. No new replies allowed.