well i have my mouse working and now im trying to make my exit button working when the mouse clicked onto exit button and it will exit the application
here is my coding for the mouse function to exit the application
............... ............... ............... ............... ............... ............... ............... .........
//The function getmousepos gets the position of the mouse alongwith the mouse button state. Like which
//button is pressed 1,2. If button =1 then it is left mouse and if it is 2 then right mouse button click.
............... ............... ............... ............... ............... ............... ............... .......
My error message when i complile
undefined symbol 'button'
undefined symbol 'x'
undefined symbol 'y'
............... ............... ............... ............... ............... ............... ............... ........
what have i done.. have i missed something there..
here is my coding for the mouse function to exit the application
............... ............... ............... ............... ............... ............... ............... .........
//The function getmousepos gets the position of the mouse alongwith the mouse button state. Like which
//button is pressed 1,2. If button =1 then it is left mouse and if it is 2 then right mouse button click.
Code:
void getmousepos(int *button,int *x,int *y) { char *ss; union REGS i,o; i.x.ax=3; int86(0x33,&i,&o); *button=o.x.bx; *x=o.x.cx; *y=o.x.dx; } //The below loop executes until anything is pressed and then getmousepos is called to get the position of //the mouse and if it falls in between x>=70 && x<=100 && y>=410 && y<=420 then exit from the program. //void thisismycode() { while(!kbhit()) { getmousepos(&button,&x,&y); if((button&1)==1) { getmousepos(&button,& x,& y); if(x>=70 && x<=100 && y>=410 && y<=420) exit(0); } } }
My error message when i complile
undefined symbol 'button'
undefined symbol 'x'
undefined symbol 'y'
............... ............... ............... ............... ............... ............... ............... ........
what have i done.. have i missed something there..
Comment