Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using Mouse in c++

Posted on 1998-09-10
5
Medium Priority
?
230 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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…
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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.
Suggested Courses

618 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