?
Solved

Using Mouse in c++

Posted on 1998-09-10
5
Medium Priority
?
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

762 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