🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3964

Re: Moving Cursor under Program Control?

#3964
From: JD
Date: Sat, 08 Apr 2006 19:05
28 lines
2184 bytes
"Nick Gessler" <gessler@ucla.edu> wrote:
>
> [...] So I would want to be able to input an endless and
> seamless stream of data from the re-purposed mouse.  I would
> use the mouse-move event to collect the data. However, the
> data stream would be interrupted when the cursor hit the
> edge of the window.

This can be easily accomplished if you change your concept of
data collection. Instead of collecting the absolute TPoint( X,Y ),
Assume that the starting position is the center of the screen
and then collect points relative to the previouse point. For
example, if the previouse point was 10,10 and the new point
is 8,12, the data point would be -2,2 and the previouse point
would become 8,12.

Now all you have to do is add logic to your code to handle
when the mouse hits the limits of the window. Just reposition
it back to the center of the screen and set the previouse point
to the center of the screen as well.

As for mouse movement in terms of GUI, you could paint
a simulated mouse at the center of the screen and set the
Screen::Cursor to crNone so that it appears that the mouse
isn't moving at all.

~ JD
Technical Details
Message-ID: <44380995$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4435c27b$1@newsgroups.borland.com> <4436a479$1@newsgroups.borland.com> <4436e650$1@newsgroups.borland.com> <44370981$1@newsgroups.borland.com> <4437fa99$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,40f8797b34d0291f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: Moving Cursor under Program Control?
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 64.12.116.201     
X-Forwarded-For: 172.169.131.231
References: <4435c27b$1@newsgroups.borland.com> <4436a479$1@newsgroups.borland.com> <4436e650$1@newsgroups.borland.com> <44370981$1@newsgroups.borland.com> <4437fa99$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44380995$1@newsgroups.borland.com>
Date: 8 Apr 2006 12:05:57 -0700
X-Trace: newsgroups.borland.com 1144523157 207.105.83.66 (8 Apr 2006 12:05:57 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail