duke_n
asked on
Mouse cursor position functions
Hi.
What are Delphi functions equivalent
to C++ GetCursorPos and SetCursorPos?
thanks
What are Delphi functions equivalent
to C++ GetCursorPos and SetCursorPos?
thanks
var
Pt : TPoint;
begin
GetCursorPos(pt);
ShowMessage('X-Coord'+IntT oStr(pt.x) +', Y-Coord'+IntToStr(pt.y));/ /Display coordinates
SetCursorPos(pt);//if mouse have moved it will return it to the same place as before
end;
I don't know how to implement the TPoint in C++...maybe something like this...This is for Builder C++ , right?
POINT pt;
{
GetCursorPos(pt);
SetCursorPos(pt);
}
Pt : TPoint;
begin
GetCursorPos(pt);
ShowMessage('X-Coord'+IntT
SetCursorPos(pt);//if mouse have moved it will return it to the same place as before
end;
I don't know how to implement the TPoint in C++...maybe something like this...This is for Builder C++ , right?
POINT pt;
{
GetCursorPos(pt);
SetCursorPos(pt);
}
I mean .....still not sure if this is the way C++ implements Point variable
{
POINT pt;
GetCursorPos(pt);
SetCursorPos(pt);
}
If you have other questions ask ;-)
Regards,
Viktor Ivanov
{
POINT pt;
GetCursorPos(pt);
SetCursorPos(pt);
}
If you have other questions ask ;-)
Regards,
Viktor Ivanov
ASKER
Thanks Viktor!
that works fine.
that works fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As far as SetCursorPos in Delphi...if I had my help in front of me...darn.