delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/20/17:55:13

From: jsc AT lds DOT co DOT uk
Newsgroups: comp.os.msdos.djgpp
Subject: (new guy) mouse woes
Date: Tue, 20 Oct 1998 21:35:11 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 28
Message-ID: <70ivmg$fak$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 194.73.88.169
X-Article-Creation-Date: Tue Oct 20 21:35:11 1998 GMT
X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.0; Windows 95)
X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 194.73.88.169
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello all,
I'm new here (mainly because my news program recently committed suicide).
I'm having a few probs with using a mouse in djgpp. I have a function

void mouse_abs_pos(int *x, int *y)
{
	union REGS regs;
	regs.x.ax = 0x03;
	int86(0x33, &regs, &regs);
	*x = regs.x.cx;
	*y = regs.x.dx;
	return 0;
}

but now I don't know how to actually get values for x and y. I also have a
function

{
	Plot_Pixel(a, b, colour);
}

And I want to plot a pixel at (a,b) where ever the mouse is on the screen. 
It simply doesn't work (I know the pixel plotting function works though). How
do I do this? The closest I've got is a memory error and then a quit. Thank
you, Christopher

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019