how to make?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • venkatesh

    #1

    how to make?

    hai,
    I am try to implement when I am clicking mouse key it should perform
    some actions ,please any one know please tell about how to make it?
    please tell any links for that operation

  • Christopher Benson-Manica

    #2
    Re: how to make?

    venkatesh <pvenkatesh2k4@ gmail.com> wrote:
    [color=blue]
    > I am try to implement when I am clicking mouse key it should perform
    > some actions ,please any one know please tell about how to make it?
    > please tell any links for that operation[/color]

    (A bit tough, since you haven't even told us what language you're using.)

    Your post is off-topic for comp.lang.c. Please visit





    for posting guidelines and frequently asked questions. Thank you.

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

    Comment

    • pemo

      #3
      Re: how to make?


      "venkatesh" <pvenkatesh2k4@ gmail.com> wrote in message
      news:1132230744 .065470.217040@ g44g2000cwa.goo glegroups.com.. .[color=blue]
      > hai,
      > I am try to implement when I am clicking mouse key it should perform
      > some actions ,please any one know please tell about how to make it?
      > please tell any links for that operation[/color]

      It 'reads like' English isn't your first language.

      Please be more specific - the more detail you provide --- well, the better
      the replies are likely to be.


      Comment

      • Keith Thompson

        #4
        Re: how to make?

        "pemo" <usenetmeister@ gmail.com> writes:[color=blue]
        > "venkatesh" <pvenkatesh2k4@ gmail.com> wrote in message
        > news:1132230744 .065470.217040@ g44g2000cwa.goo glegroups.com.. .[color=green]
        >> hai,
        >> I am try to implement when I am clicking mouse key it should perform
        >> some actions ,please any one know please tell about how to make it?
        >> please tell any links for that operation[/color]
        >
        > It 'reads like' English isn't your first language.
        >
        > Please be more specific - the more detail you provide --- well, the better
        > the replies are likely to be.[/color]

        Sorry, but asking the question more clearly isn't likely to help. The
        question seems clear enough to me already; he wants to know how to
        make a C program perform some action when the user clicks a mouse key.

        Standard C provides no facilities for doing this. He'll need to ask
        in a newwsgroup that's specific to whatever system he's using.

        --
        Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
        San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
        We must do something. This is something. Therefore, we must do this.

        Comment

        • Flash Gordon

          #5
          Re: how to make?

          pemo wrote:[color=blue]
          > "venkatesh" <pvenkatesh2k4@ gmail.com> wrote in message
          > news:1132230744 .065470.217040@ g44g2000cwa.goo glegroups.com.. .[color=green]
          >> hai,
          >> I am try to implement when I am clicking mouse key it should perform
          >> some actions ,please any one know please tell about how to make it?
          >> please tell any links for that operation[/color]
          >
          > It 'reads like' English isn't your first language.
          >
          > Please be more specific - the more detail you provide --- well, the better
          > the replies are likely to be.[/color]

          Since mice are not supported by standard C it is not topical and the OP
          should *not* post additional detail here, nor should the OP be
          encouraged to post additional information here.

          The OP should as in a group for the system of interest and provide
          detail there.
          --
          Flash Gordon
          Living in interesting times.
          Although my email address says spam, it is real and I read it.

          Comment

          • Mabden

            #6
            Re: how to make?

            "pemo" <usenetmeister@ gmail.com> wrote in message
            news:I08ff.1746 1$6A4.3509@fe1. news.blueyonder .co.uk...[color=blue]
            >
            > "venkatesh" <pvenkatesh2k4@ gmail.com> wrote in message
            > news:1132230744 .065470.217040@ g44g2000cwa.goo glegroups.com.. .[color=green]
            > > hai,
            > > I am try to implement when I am clicking mouse key it should perform
            > > some actions ,please any one know please tell about how to make it?
            > > please tell any links for that operation[/color][/color]


            #include <conio.h>
            #include <dos.h>
            #include <stdio.h>
            #include <stdlib.h>

            #define MOUSE 0x33
            #define IRET 0xcf

            int main(void)
            {
            union REGS in_reg, out_reg;
            void (interrupt far *int_handle)();
            long vector;
            unsigned char first_byte;
            char buffer[64];

            int_handle = getvect(MOUSE);
            first_byte = *(unsigned char far *)int_handle;
            vector = (long)int_handl e;

            /* vector should not be 0 and first byte should not be IRET */
            if ( (vector == 0) || (first_byte == IRET) )
            {
            fprintf(stdout, "Mouse driver not found.\n");
            return(0);
            }
            in_reg.x.ax = 0; /* mouse reset and status */
            int86(MOUSE, &in_reg, &out_reg);

            if (out_reg.x.ax != (unsigned int)-1)
            {
            fprintf(stdout, "Mouse not found.\n");
            return(0);
            }
            in_reg.x.ax = 36; /* get mouse info */
            int86(MOUSE, &in_reg, &out_reg);
            switch(out_reg. h.ch)
            {
            case 1:
            sprintf(buffer, "a bus mouse");
            break;
            case 2:
            sprintf(buffer, "a serial mouse");
            break;
            case 3:
            sprintf(buffer, "an InPort mouse");
            break;
            case 4:
            sprintf(buffer, "a PS/2 mouse");
            break;
            case 5:
            sprintf(buffer, "an HP mouse");
            break;
            }
            fprintf(stdout, "Mouse driver v%x.%x is loaded for %s.\n",
            out_reg.h.bh, out_reg.h.bl, buffer);
            return((int)out _reg.h.bh);
            }


            --
            Mabden


            Comment

            Working...