Mouse Functions

A

Aris

Where can I found the way that c++ manipulates mouse events in graphic mode?
thank you.
 
V

Victor Bazarov

Aris said:
Where can I found the way that c++ manipulates mouse events in
graphic mode? thank you.

In the programming manual for your OS. C++ has no means to manipulate
any hardware, mouse included.

V
 
A

Aris

I mean....I've tried to make the beginning of a known game in c++.You got a
paddle and you move it to repulse a ball coming of above . I need to move
the paddle using my mouse.So I want to know the way to handle it .Its easy
to handle keyboard if you press that key the paddle moving right if you
press the ather its moving left but how can I do it by mouse?
 
V

Victor Bazarov

Aris said:
I mean....I've tried to make the beginning of a known game in c++.You got a
paddle and you move it to repulse a ball coming of above . I need to move
the paddle using my mouse.So I want to know the way to handle it .Its
easy
to handle keyboard if you press that key the paddle moving right if you
press the ather its moving left but how can I do it by mouse?

What part of "C++ has no means to manipulate any hardware" do you not get?

Post your question to a newsgroup that deals with your OS.
 
A

Aris

i think i got it....
do I have to make an assembly subrutine and connect it with my c++ program?
Thank you.
 
J

Jonathan Hamilton

Aris said:
i think i got it....
do I have to make an assembly subrutine and connect it with my c++ program?
Thank you.
Using a mouse completely depends on the OS you are using, so there is
nothing in standard c++ for any mouse use. There are ways of doing this
with non-standard libraries, like the windows API (if using windows) or
GPM (if using linux or whatever).

Try looking for a newsgroup catering for programming specifically for
the OS you are using, and ask them instead.
 
D

Davide \M3xican\ Coppola

Aris said:
I mean....I've tried to make the beginning of a known game in c++.You got a
paddle and you move it to repulse a ball coming of above . I need to move
the paddle using my mouse.So I want to know the way to handle it .Its easy
to handle keyboard if you press that key the paddle moving right if you
press the ather its moving left but how can I do it by mouse?

You can use a library like SDL:
http://www.libsdl.org/

Cya
 

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,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top