Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting the mouse coordinates

0 views
Skip to first unread message

SWakely662

unread,
Nov 13, 1997, 3:00:00 AM11/13/97
to

Hello all,
I have a question which should really be a very simple one. I am writing a
windows program in C that needs to find the coordinates of the mouse at any
point in time. I would have thought that there would be some simple Windows
API function which would return the current position of the mouse. However, I
have not been able to find any such function.

Is there one?

Thanks

Tali Streit

unread,
Nov 14, 1997, 3:00:00 AM11/14/97
to


SWakely662 <swake...@aol.com> wrote in article
<19971113203...@ladder01.news.aol.com>...


> windows program in C that needs to find the coordinates of the mouse at
any
> point in time. I would have thought that there would be some simple

void GetCursorPos(lppt)

POINT FAR* lppt; /* address of structure for cursor position */


The GetCursorPos function retrieves the screen coordinates of the cursor's
current position.

Raymond Chen

unread,
Nov 14, 1997, 3:00:00 AM11/14/97
to

GetCursorPos


--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.)

oingo

unread,
Nov 18, 1997, 3:00:00 AM11/18/97
to SWakely662

Look in the windows API!
You will have to handle the message WM_MOUSEMOVE. It isn't an API
call. Windows will send your program the message when the mouse is
moved, with the coordinates. Look through all of the WM_ messages & see
all the things that windows can notify you of. (WM_ stands for Windows
Message )

Dave
nojunkmailp...@netvalue.net


SWakely662 wrote:
>
> Hello all,
> I have a question which should really be a very simple one. I am writing a

> windows program in C that needs to find the coordinates of the mouse at any

Antonis Karydas

unread,
Nov 19, 1997, 3:00:00 AM11/19/97
to

Use the GetCursorPos API.
0 new messages