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.
Originally Posted by 1337_ObamaBinLaden
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.
Please wait with posting the truth untill after me or any of my sons took the time to annoy the person asking questions :P
Originally Posted by B1ackAnge1
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.)
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.
Originally Posted by ObamaBinLaden
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?!
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.