Solved

Using Mouse in c++

Posted on 1998-09-10
5
211 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now