no recoil in c++

B

billy blanks

im wondering how i would write a program in c++ that when someone hits
the left mouse button it will pull it down...creating less recoil in a
video game

thanks for all responses :)
 
J

jeffc

billy blanks said:
im wondering how i would write a program in c++ that when someone hits
the left mouse button it will pull it down...

It will pull *what* down?
...creating less recoil in a video game

What on earth are you talking about?
 
H

Howard

billy blanks said:
im wondering how i would write a program in c++ that when someone hits
the left mouse button it will pull it down...creating less recoil in a
video game

thanks for all responses :)

Are you talking about having your program control the mouse button? That's
not possible. The mouse buttons have no electronics to control them by any
means whatsoever. Your finger does all the controlling. The computer
simply reads the state of the mouse buttons. There is no feedback path from
the computer to the mouse buttons. (That's be pretty neat, though...imagine
your mouse suddenly running around the desktop by itself, pushing its own
buttons! That'd sure scare the cat! :))

-Howard
 
L

Le Géant Vert

Howard said:
Are you talking about having your program control the mouse button? That's
not possible. The mouse buttons have no electronics to control them by any
means whatsoever. Your finger does all the controlling. The computer
simply reads the state of the mouse buttons. There is no feedback path from
the computer to the mouse buttons. (That's be pretty neat, though...imagine
your mouse suddenly running around the desktop by itself, pushing its own
buttons! That'd sure scare the cat! :))

-Howard

i remember Logitech created some mouses with force feedback... totally
useless it seems, it did not have any success... For example, the mouse was
harder to drag when over an icon, to "materialize" the object...
sorry, no more details :/
 
J

jeffc

Howard said:
Are you talking about having your program control the mouse button? That's
not possible. The mouse buttons have no electronics to control them by any
means whatsoever. Your finger does all the controlling. The computer
simply reads the state of the mouse buttons. There is no feedback path from
the computer to the mouse buttons. (That's be pretty neat, though...imagine
your mouse suddenly running around the desktop by itself, pushing its own
buttons! That'd sure scare the cat! :))

Well, if that *is* what he's talking about, I'm pretty sure there are force
feedback mice, just like there are force feedback joysticks. Even then his
question is still extremely murky, but in any case I'm sure the answer is
"it doesn't have anything to do with C++ per se."
 
R

Rolf Magnus

Howard said:
Are you talking about having your program control the mouse button?
That's not possible. The mouse buttons have no electronics to control
them by any means whatsoever. Your finger does all the controlling.
The computer simply reads the state of the mouse buttons. There is no
feedback path from the computer to the mouse buttons. (That's be
pretty neat, though...imagine your mouse suddenly running around the
desktop by itself, pushing its own buttons! That'd sure scare the
cat! :))

Well, there are force feedback mice, though those probably don't have
feedback on their buttons ;-)
 
H

Howard

jeffc said:
Well, if that *is* what he's talking about, I'm pretty sure there are force
feedback mice, just like there are force feedback joysticks. Even then his
question is still extremely murky, but in any case I'm sure the answer is
"it doesn't have anything to do with C++ per se."

Force feedback mice, from what I've read, affect the whole mouse body, not
the up/down state of the buttons. They won't push (pull? :)) the buttons
for you. That's a pretty useless feature. And as you say, nothing to do
with C++. And if you *DID* have a mouse that let you control the buttons
via software, then the documentation for that mouse would be where to find
out how to do it, not this newsgroup.

-Howard
 
B

billy blanks

Rolf Magnus said:
Well, there are force feedback mice, though those probably don't have
feedback on their buttons ;-)

sorry guys that was really vag i want the program to pull the mouse
arrow down when the person clicks the left mouse button
 
P

Peter van Merkerk

billy blanks said:
sorry guys that was really vag i want the program to pull the mouse
arrow down when the person clicks the left mouse button

Standard C++ has no support for mouse, mouse pointers and other GUI stuff
in standard C++. To accomplish what you want, you will need to use platform
specific functions. Since platform specific functions are beyond the scope
of this newsgroup, you will have look for a newsgroup dedicated to your
platform. Suggestions for more appropriate newsgroups can be found here:
http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
 
J

jeffc

billy blanks said:
sorry guys that was really vag i want the program to pull the mouse
arrow down when the person clicks the left mouse button

That's going to be system specific - for example, if on Windows, you'll have
to look it up in Visual C++ documentation, or whatever you're using. It's
not part of C++ per se.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top