Click here to Skip to main content
15,891,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: i/o registers that control cash drawer Pin
Member 1060107320-Feb-14 20:01
Member 1060107320-Feb-14 20:01 
GeneralRe: i/o registers that control cash drawer Pin
enhzflep20-Feb-14 20:17
enhzflep20-Feb-14 20:17 
QuestionHandling mouse using OS interrupts Pin
myth199015-Feb-14 18:03
myth199015-Feb-14 18:03 
AnswerRe: Handling mouse using OS interrupts Pin
Richard MacCutchan15-Feb-14 21:29
mveRichard MacCutchan15-Feb-14 21:29 
GeneralRe: Handling mouse using OS interrupts Pin
myth199015-Feb-14 22:31
myth199015-Feb-14 22:31 
GeneralRe: Handling mouse using OS interrupts Pin
Software_Developer16-Feb-14 2:01
Software_Developer16-Feb-14 2:01 
GeneralRe: Handling mouse using OS interrupts Pin
myth199016-Feb-14 2:13
myth199016-Feb-14 2:13 
GeneralRe: Handling mouse using OS interrupts Pin
Software_Developer16-Feb-14 3:28
Software_Developer16-Feb-14 3:28 
Turbo C++ code.
Copy paste this to a file named mouse.h .

<-------- start of mouse.h

C++
include <fstream.h>
#include <conio.h>
#include <dos.h>
#include <stdlib.h>
#include <alloc.h>

const ress=0xb;

unsigned hspd,vspd,thv,button,mouse_x,mouse_y;
int dirx,diry,dir_x,dir_y,trshold;
unsigned char mousestep;



void initmouse(void)
{
  asm{
       mov ax,1h
       int 33h

     }
}

void hidemouse(void)
{
  asm{
       mov ax,2h
       int 33h

     }
}


void getmousepos(void)
{
  asm{
	mov ax,3h
	int 33h
	mov button,bx
	mov mouse_x,cx
	mov mouse_y,dx
     }
}


void getmousedirection(void)
{
  asm{
	mov ax,ress
	int 33h
	mov trshold,bx
	mov dirx,cx
	mov diry,dx
     }
}


void getmousespeed(void)
{
  asm{
	mov ax,1bh
	int 33h
	mov bx,hspd
	mov cx,vspd
	mov dx,thv
     }
}







<-------- end of mouse.h
GeneralRe: Handling mouse using OS interrupts Pin
myth199017-Feb-14 2:29
myth199017-Feb-14 2:29 
GeneralRe: Handling mouse using OS interrupts Pin
myth199022-Feb-14 17:59
myth199022-Feb-14 17:59 
GeneralRe: Handling mouse using OS interrupts Pin
Richard MacCutchan16-Feb-14 2:15
mveRichard MacCutchan16-Feb-14 2:15 
GeneralRe: Handling mouse using OS interrupts Pin
myth199016-Feb-14 2:21
myth199016-Feb-14 2:21 
GeneralRe: Handling mouse using OS interrupts Pin
Richard MacCutchan16-Feb-14 2:28
mveRichard MacCutchan16-Feb-14 2:28 
GeneralRe: Handling mouse using OS interrupts Pin
myth199016-Feb-14 2:32
myth199016-Feb-14 2:32 
Questionredirecting output of CMD with administrator privileges Pin
camillo8715-Feb-14 1:29
camillo8715-Feb-14 1:29 
AnswerRe: redirecting output of CMD with administrator privileges Pin
Richard Andrew x6415-Feb-14 10:23
professionalRichard Andrew x6415-Feb-14 10:23 
SuggestionRe: redirecting output of CMD with administrator privileges Pin
David Crow15-Feb-14 11:10
David Crow15-Feb-14 11:10 
Questionhow to read character by character from text file in c++? Pin
sajedevahedi14-Feb-14 10:32
sajedevahedi14-Feb-14 10:32 
AnswerRe: how to read character by character from text file in c++? Pin
jeron114-Feb-14 10:56
jeron114-Feb-14 10:56 
GeneralRe: how to read character by character from text file in c++? Pin
sajedevahedi14-Feb-14 11:18
sajedevahedi14-Feb-14 11:18 
GeneralRe: how to read character by character from text file in c++? Pin
jeron114-Feb-14 11:30
jeron114-Feb-14 11:30 
AnswerRe: how to read character by character from text file in c++? Pin
Richard MacCutchan14-Feb-14 22:43
mveRichard MacCutchan14-Feb-14 22:43 
AnswerRe: Just put the 'file.get' into a 'while' statement. Pin
Software_Developer15-Feb-14 1:51
Software_Developer15-Feb-14 1:51 
AnswerRe: how to read character by character from text file in c++? Pin
leon de boer4-Mar-14 15:03
leon de boer4-Mar-14 15:03 
QuestionC program help Pin
MalDrHoop14-Feb-14 6:00
MalDrHoop14-Feb-14 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.