473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Mouse Functions

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


Jul 23 '05 #1
6 8102
Aris wrote:
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
Jul 23 '05 #2
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?


Ο "Victor Bazarov" <v.********@comAcast.net> έγραψε στο μήνυμα
news:b4********************@comcast.com...
Aris wrote:
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

Jul 23 '05 #3
"Aris" <11********@otenet.gr> wrote...
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.
Ο "Victor Bazarov" <v.********@comAcast.net> έγραψε στο μήνυμα
news:b4********************@comcast.com...
Aris wrote:
> 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


Jul 23 '05 #4
i think i got it....
do I have to make an assembly subrutine and connect it with my c++ program?
Thank you.


Jul 23 '05 #5
Aris wrote:
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.

--
Jonathan Hamilton
Jul 23 '05 #6
Aris wrote:
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
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ima Lostsoul | last post by:
Anyone have a simple way to disbale the wheel on a wheel mouse in Access Apps? I have tried the Lebans code and it does not work for my application.
19
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up...
10
by: sagar | last post by:
hi everyone, i m having a problem with mouse events. any help related is apreciated. i m having a form in which i m having 2 buttons. and i m moving(draging) these buttons on run time using...
4
by: flplini | last post by:
I want to ask how to use C++ to simulate the mouse control? ex:Let the mouse double-click the left key functions,thanks!
5
by: Sabbaath | last post by:
First off, I've pretty much convinced myself that the issue is that there are onmouseover events inside the div that contains an onmouseover event on it... I wrote the message below first. This was...
0
by: malen | last post by:
Hi all! I'm building mouse movement filter program for Windows and Mac OS X. In Windows I use ctypes.windll.user32.getCursorPos(pointer) and ctypes.windll.user32.setCursorPos(x,y) to get and set...
0
by: Harshpandya | last post by:
Hi, I want to show the live video on the network using flash video and quicktime. Now since its a live video i want to put mouse over it and able to click on screen and change the camera view or...
4
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.