By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,433 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,433 IT Pros & Developers. It's quick & easy.

how to make?

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
venkatesh <pv***********@gmail.com> wrote:
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


(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

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 17 '05 #2

P: n/a

"venkatesh" <pv***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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


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.
Nov 17 '05 #3

P: n/a
"pemo" <us***********@gmail.com> writes:
"venkatesh" <pv***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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


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.


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_Keith) ks***@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.
Nov 17 '05 #4

P: n/a
pemo wrote:
"venkatesh" <pv***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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


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.


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.
Nov 18 '05 #5

P: n/a
"pemo" <us***********@gmail.com> wrote in message
news:I0******************@fe1.news.blueyonder.co.u k...

"venkatesh" <pv***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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

#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_handle;

/* 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
Nov 25 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.