I need two things....

Posts 17 of 7 · Page 1 of 1
I need two things....
1. How would i find the x and y coords of the mouse with c++/vc++?
2. How to i send a fake key message in vc++? (I know c++ is SendMessage and PostMessage, but you can't use them in vc++.)



Don't post any Lmgtfy crap. I ALREADY GOOGLED IT and did not find any awnsers to either.
Quote Originally Posted by 1337_ObamaBinLaden View Post
1. How would i find the x and y coords of the mouse with c++/vc++?
2. How to i send a fake key message in vc++? (I know c++ is SendMessage and PostMessage, but you can't use them in vc++.)



Don't post any Lmgtfy crap. I ALREADY GOOGLED IT and did not find any awnsers to either.

1. GetCursorPos()
2. Yes you can
Lmgtfy

Quote Originally Posted by B1ackAnge1 View Post
1. GetCursorPos()
2. Yes you can
Please wait with posting the truth untill after me or any of my sons took the time to annoy the person asking questions :P
Quote Originally Posted by B1ackAnge1 View Post
1. GetCursorPos()
2. Yes you can
Can you explain how? When ever I try it it gives me errors. (Usualy it tells me to declare it when I already have.)
Quote Originally Posted by Disturbed View Post


Can you explain how? When ever I try it it gives me errors. (Usualy it tells me to declare it when I already have.)
For different situations there are different errors. It could be a million different things. You would have to post the code for us to look at it, post the errors atleast, or figure it out urself otherwise we are shooting in the in the dark...

Here's my answer so far:
Usualy it tells me to declare it...
Well then declare it.

when I already have.
Well fuck I don't know o_O?!
Here's a little something I put together quickly. It'll tell you your mouse position as soon as it opens.

Code:
#include <iostream>
#include <windows.h>

using namespace std;

POINT pt;

int main()
{
    GetCursorPos(&pt);
    cout << pt.x << "," << pt.y;
    cin.get();
}
As for your error. If a data type does not exist. The variable can't actualy be declared so if you use it, it'll just tell you it's undeclared. In this case it's the data type "POINT". If you take windows.h out of this program you'll see what i'm talking about. I'm using Dev C++ by the way.
have no fear, HD's son #2 is here. I have no comment to make, and this is spam, but I LOL@joo.all ne-waiZ.

PS - google harder, t3h l33t pr0nZ @r3 w41ting 4 Jo0 ( Vocabulary Fail ).



I use borland, vc++ kind of fails at finding errors.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?