# Thread: Function to find resolution

1. ## Function to find resolution

Im working on a program called mouse odometer, which will find how much you move your mouse (like in meters or kilometers or whatever) and its going to find how many pixels your mouse moves and then multiply that by whatever number to get distance, but since the resolution and moniter size determine size of pixels, I need a function to find the resolution that is being run. Can someone tell me a function to do this? Thanks

2. It depends on if you're writing a Windows application or something else. Try google.

3. Why does everyone love google so much? Google never helps me that much when im looking for stuff like this. The most it ever helped me was to find this site. I did just look there, but I guess ill just go back to it...

4. Search for something specific, like "get return find screen resolution c programming".

5. > Why does everyone love google so much?
Because that's how we get to find out stuff, read books, manual pages, STFW.
Do you think some of us are born with this information?
No, those who answer are simply more adept (and motivated) to dig out this information from ourselves.

6. i don't know, is this what you are looking for:

Code:
```  int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);```
BTW google helped me to find it...

7. Why does everyone love google so much? Google never helps me that much when im looking for stuff like this. The most it ever helped me was to find this site. I did just look there, but I guess ill just go back to it...
Cuz it rocks.

If google hasn't helped you find information then I'm afraid you are research impaired and should go see a doctor. Ya know how good Google really is? It's so good that even Microsoft is feeling threatened by it.

The Windows API has functions that return the relative positions of the mouse which when multiplied by the logical device units, also retrieveable from the API, will yield the distance traveled.
I'm sure mouse manufacturers have actually coded this type of thing to test how durable their product is.

8. Ok, sorry I was whining, Im just a little stressed and tired because there are a lot of projects due lately and exams are starting...

BTW thanks what3v3r

Bubba, I actualy had a program that did this, but i lost it and can't find it again, so I decided to make it on my own. I was concidering making it a portable application for a flash drive or somthing like that.