C mouse programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gurmeet07
    New Member
    • Mar 2008
    • 6

    #1

    C mouse programming

    hi to all

    here are some functions of C
    can anybody explain these functions??????
    actually i have to make a project in C and smbody told me u can use these functions for mouse programming but i dont know wat to do with these??????
    can u please explain it wat exactly these functions are doing???

    int initmouse()
    {
    i.x.ax=0;
    int86(0x33,&i,& o);
    return(o.x.ax);
    }

    void showmouseptr()
    {
    i.x.ax=1;
    int86(0x33,&i,& o);
    }

    int restrictmousept r(int x1,int y1,int x2,int y2)
    {
    i.x.ax=7;
    i.x.cx=x1;
    i.x.dx=x2;
    int86(0x33,&i,& o);

    i.x.ax=8;
    i.x.cx=y1;
    i.x.dx=y2;
    int86(0x33,&i,& o);
    }

    void getmousepos(int *button,int *x,int *y)
    {
    i.x.ax=3;
    int86(0x33,&i,& o);
    *button=o.x.bx;
    *x=o.x.cx;
    *y=o.x.dx;
    }
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Did you try putting these into a compiler and seeing what they did, then playing with the values in there to get an even better idea of what it does?

    Comment

    • gurmeet07
      New Member
      • Mar 2008
      • 6

      #3
      thnx for the suggestio n dear

      I have already tried that but i m not able to understand what does i , o ,x and ax exactly means??????????
      why int86 has been used ???

      like in the following code ............... .

      i.x.ax=0;
      int86(0x33,&i,& o);
      return(o.x.ax);

      Comment

      Working...