POINT mousePos;
GetCursorPos(&mousePos);
// work with mousePos.x ,mousePos.y
POINT setPoint = {100,100};
SetCursorPos(&setPoint);
user88 said:idkCode:POINT mousePos; GetCursorPos(&mousePos); // work with mousePos.x ,mousePos.y POINT setPoint = {100,100}; SetCursorPos(&setPoint);
maybe a bit different, its from brain
but btw why not use google u lazy shit
#include <windows.h>
#include <winuser.h>
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
POINT Cursor;
while (true){
GetCursorPos(&Cursor);
cout << "The cursor x is: " << Cursor.x << " and y is: " << Cursor.y << endl;
}
system("pause");
}
user88 said:first thing u wanna know
if u want learn it really
1. lesson: dont ask too much, like this easy things are in the basics so ..
asking too much will not help to understand code etc.
Parazitas said:user88 said:first thing u wanna know
if u want learn it really
1. lesson: dont ask too much, like this easy things are in the basics so ..
asking too much will not help to understand code etc.
Next question , how to get active window position?
@user88
user88 said:WTF 1.st link in google
wtf
dont ask anymore pls
u will not learn it
RECT rect;
if (GetWindowRect(OSRS, &rect))
{
int width = rect.right - rect.left;
int height = rect.bottom - rect.top;
cout << "The width is: " << width << " and height is: " << height << endl;
}
RECT rect;
if (GetWindowRect(OSRS, &rect))
{
int X = rect.left;
int Y =rect.top;
cout << "The Xcoords is: " << X << " and Ycoords is: " << Y << endl;
}
Opcode.eXe said:Parazitas said:user88 said:first thing u wanna know
if u want learn it really
1. lesson: dont ask too much, like this easy things are in the basics so ..
asking too much will not help to understand code etc.
Next question , how to get active window position?
@user88
http://lmgtfy.com/?q=how+to+get+active+window+position+c%2B%2B%3F