Solved

Using Mouse in c++

Posted on 1998-09-10
5
215 Views
Last Modified: 2010-04-02
how can i use a mouse in a c++ program. i'm using
turbo c++ 3.00.
0
Comment
Question by:nitin_kumars
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:WxW
ID: 1172485
If you use it under DOS , you should learn about the Int 33h stuff . I have the docs written so I cannot send them , but I am sure you will find relative docs in the net .

If it is a windows program ,the Win Api messages like WM_MOUSEMOVE etc will help
0
 
LVL 6

Expert Comment

by:WxW
ID: 1172486
If you use it under DOS , you should learn about the Int 33h stuff . I have the docs written so I cannot send them , but I am sure you will find relative docs in the net .

If it is a windows program ,the Win Api messages like WM_MOUSEMOVE etc will help
0
 

Author Comment

by:nitin_kumars
ID: 1172487
ya i use it under dos ..but i'll really appericiate if you provide with bit more help ie where can i find imformation on it?
0
 

Accepted Solution

by:
BeastRex earned 50 total points
ID: 1172488
void mouse_init ()
{
  asm
  {  
     mov ax, 20  /* enable mouse driver */
     int 33h
         
     mov ax,1  /* show mouse */
     int 33h
 
  }  /* does Turbo c++ require colon?  ; */

}

For more action and fun,
You can go and download
 www.simtel.netftp://ftp.simtel.net/pub/simtelnet/msdos/mouse/mou105.zip.
This is source code for DOS mouse routines.
Have fun!!

0
 

Expert Comment

by:BeastRex
ID: 1172489
oops, semi-colon, I mean. After the asm { } brackets.
:)
The source code mou105.zip is Turbo C compatible, so, you'll have no problems with
syntax.  :)
have fun!


0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Issue accessing member variable of atomic class 16 116
Safe conversion? 4 69
draw a Christmas tree by using a nested loop? 26 62
How do i run a c++ file? 15 30
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question