Solved

Using Mouse in c++

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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…
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 member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 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