Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How to simulate the mouse control?

Reply
Thread Tools

How to simulate the mouse control?

 
 
flplini@i-image.com.tw
Guest
Posts: n/a
 
      10-22-2006
I want to ask how to use C++ to simulate the mouse control?
ex:Let the mouse double-click the left key functions,thanks!

 
Reply With Quote
 
 
 
 
Phlip
Guest
Posts: n/a
 
      10-22-2006
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!!!


 
Reply With Quote
 
 
 
 
W Marsh
Guest
Posts: n/a
 
      10-22-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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);
 
Reply With Quote
 
Gernot Frisch
Guest
Posts: n/a
 
      10-23-2006
>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?


 
Reply With Quote
 
BobR
Guest
Posts: n/a
 
      10-24-2006

Gernot Frisch wrote in message <(E-Mail Removed)>...
>>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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Simulate Mouse Event vunet.us@gmail.com Javascript 7 08-09-2007 01:35 PM
How to simulate Mouse Click with Ruby, or mouse library Kid Kid Ruby 6 05-08-2007 12:43 PM
Heres a mouse theres a mouse what a mouse do? unholy Gaming 37 09-17-2006 08:59 AM
Simulate Mouse/Keyboard to stop Screen Saver Michael J Whitmore Python 1 11-06-2003 06:47 PM



Advertisments