473,383 Members | 1,821 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,383 software developers and data experts.

How to simulate the mouse control?

I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions,thanks!

Oct 22 '06 #1
4 7485
flplini wrote:
I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions,thanks!
This is a question about your GUI platform (probably Win32). It's not a
question about C++ because your platform supports many languages, and so
there's nothing C++ specific in the answer.

This newsgroup is only qualified to answer questions about the raw C++
language itself. (Always read a newsgroup before posting, and you might have
noticed our reaction to off-topic posts!) You will get the best results on a
newsgroup with win32, programming, and possibly gui in its name.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Oct 22 '06 #2
fl*****@i-image.com.tw wrote:
I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions,thanks!
void SimulateMouseClick(int x, int y, MouseButton button);
Oct 22 '06 #3
>I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions

What is a mouse?
Oct 23 '06 #4

Gernot Frisch wrote in message <4q************@individual.net>...
>>I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions

What is a mouse?
A small rodent!!
So, a "mouse control" could just be a mousetrap.

Must be one smart mouse if it knows how to double-click the left key
functions [1]!
If it's that smart, it wouldn't be a matter of "Let", but, how would you stop
him!

OP: Have your mouse post some C++ code, I'd like to see what he's working on.

Real answer:
std::istringstream mouse("126 211 0 250 345 2 111 123 1");
int Mx(0), My(0), Button(0); // yeah, bad 'style'. Put on separate lines.
while( mouse >Mx >My >Button ){
if( Button == 2 ){
std::cout << "Mx=" << Mx << " My=" << My <<std::endl;
} // if(2)
} // while(mouse)

[1] - wonder if he means "function keys" (F1-F12)?
--
Bob 'duh' R
POVrookie
Oct 24 '06 #5

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

Similar topics

0
by: Charles Law | last post by:
I have a user control which can be dragged and dropped onto a form in my application when it is running. I draw a selection border around my control, and allow it to be dragged to a new location on...
0
by: Mythran | last post by:
I'm trying to create a library that will 1.) Simulate an input device (IE: keyboard, mouse, joystick) and 2.) Capture data sent from an input device (IE: keyboard, mouse, joystick). The reason's...
3
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data...
3
by: madhuri.eerupula | last post by:
Hi. How to simulate(automatic) mouse movements and click operation using c#. Actually, i got pixels in the face (face tracking) right now and i need to move mouse(automatically, without using...
4
by: Abhishek | last post by:
Hi, I have a activex web browser embedded in a windows form and on a click of a form button i need the mouse to go the position for example 100, 100 and click the link that will be there on that...
1
by: diegocarpintero | last post by:
I am writing a c# class which main purpose is to simulate the dialog with a GUI-application. The idea is that this class can simulate some user actions like mouse clicks on buttons. I have...
18
by: eliss.carmine | last post by:
Is it possible to simulate a mouse click in the window I made (it's a Form), but not give it focus? I tried using WinAPI's mouseevent and SendMessage of WM_LBUTTONDOWN/WM_LBUTTONUP as suggested...
5
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the...
3
by: =?Utf-8?B?cHJvZ2dlcg==?= | last post by:
I have a C# application that hosts an AxWebBrowser control which I automate by sending mouse clicks and keyboard input. I have had various problems in doing this due to a bug in the AxWebBrowser...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.