How to simulate the mouse control?

Discussion in 'C++' started by flplini@i-image.com.tw, Oct 22, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Phlip Guest

    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!!!
     
    Phlip, Oct 22, 2006
    #2
    1. Advertising

  3. W Marsh Guest

    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);
     
    W Marsh, Oct 22, 2006
    #3
  4. >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?
     
    Gernot Frisch, Oct 23, 2006
    #4
  5. BobR Guest

    Gernot Frisch wrote in message <>...
    >>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
     
    BobR, Oct 24, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davisro
    Replies:
    2
    Views:
    1,316
    Jim Corey
    Apr 23, 2004
  2. =?Utf-8?B?am9qb2Jhcg==?=
    Replies:
    1
    Views:
    4,090
    wwwtar
    Oct 2, 2006
  3. Michael J Whitmore

    Simulate Mouse/Keyboard to stop Screen Saver

    Michael J Whitmore, Nov 6, 2003, in forum: Python
    Replies:
    1
    Views:
    1,323
    Dave Brueck
    Nov 6, 2003
  4. Kid Kid
    Replies:
    6
    Views:
    484
  5. Simulate Mouse Event

    , Aug 8, 2007, in forum: Javascript
    Replies:
    7
    Views:
    161
Loading...

Share This Page