1. mouse pointer graphics corruption
		
		
------=_NextPart_000_709faf61_32cdefd7$6780ead5
 boundary="----=_NextPart_001_2a367274_32cdefd7$6780ead5"
------=_NextPart_001_2a367274_32cdefd7$6780ead5
Content-type: text/plain; format=flowed;
Hello All,
I'm writing a program and a little gui to go with it.
Everything seems to work fine except the mouse routines.
What I'm doing is capturing a little segment of the screen
where the mouse pointer is before I draw my custom pointer.
The next time the mouse routine (type) is called, I replace
the old segment of the screen and draw the pointer at the
new mouse location and so on...  This system works fine
except when a mouse click changes the screen image
underneith it.  When this happens, the changes are erased
by the mouse update.  Is there a simple way to get around
it without resorting to external mouse libraries?  That
would be ok if there is no simple alternatives. I would be
most appreciative.
Here is my basic design:
--Begin Pseudocode
with typecheck
type mouse (object m)
    display_image (oldpos [1], oldpos[2])
    save_image (m[2..3])
    draw_pointer (m[2..3])
end type
global function ObjectClicked (object m, sequence TheObjects)
  integer crntObj
  for i = 1 to length (TheObjects) do
    if sequence(m) and MouseOver (m, TheObjects [i]) then
      crntObj = i
    end if
  end for
  if m[1] = LEFT_DOWN then
    return i
  end if
  return 0
end function
mouse m
integer O
while get_key() = 27 do
  m = get_mouse()
  O = ObjectClicked (m, Buttons)
  if O then
    ChangeTheImageOf (O)
  end if
end while
--End Pseudocode
I hope I'm making enough sense that someone can help me.
This is just an oversimplified model of my mouse input
structure design.
TIA for any help
Lewis Townsend
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
------=_NextPart_001_2a367274_32cdefd7$6780ead5
Content-type: text/html
<html><body bgcolor='#ffffff'>
<table border="0" width="100%" height="300" bgcolor="#ccbb99"
 background="cid:part_00$32cdefd7$6780ead5 at hotmail.com">
<tr>
<td valign="top" align="left"><font face="Comic Sans MS, sans serif"
 color="#000066"><div name='messagebody'>Hello All,
<br>
<br>I'm writing a program and a little gui to go with it.
<br>Everything seems to work fine except the mouse routines.
<br>What I'm doing is capturing a little segment of the screen
<br>where the mouse pointer is before I draw my custom pointer.
<br>The next time the mouse routine (type) is called, I replace
<br>the old segment of the screen and draw the pointer at the
<br>new mouse location and so on...  This system works fine
<br>except when a mouse click changes the screen image
<br>underneith it.  When this happens, the changes are erased
<br>by the mouse update.  Is there a simple way to get around
<br>it without resorting to external mouse libraries?  That
<br>would be ok if there is no simple alternatives. I would be
<br>most appreciative.
<br>
<br>Here is my basic design:
<br>
<br>--Begin Pseudocode
<br>with typecheck
<br>
<br>type mouse (object m)
<br>   display_image (oldpos [1], oldpos[2])
<br>   save_image (m[2..3])
<br>   draw_pointer (m[2..3])
<br>end type
<br>
<br>global function ObjectClicked (object m, sequence TheObjects)
<br> integer crntObj
<br> for i = 1 to length (TheObjects) do
<br>   if sequence(m) and MouseOver (m, TheObjects [i]) then
<br>     crntObj = i
<br>   end if
<br> end for
<br> if m[1] = LEFT_DOWN then
<br>   return i
<br> end if
<br> return 0
<br>end function
<br>
<br>mouse m
<br>integer O
<br>
<br>while get_key() = 27 do
<br> m = get_mouse()
<br> O = ObjectClicked (m, Buttons)
<br> if O then
<br>   ChangeTheImageOf (O)
<br> end if
<br>end while
<br>--End Pseudocode
<br>
<br>I hope I'm making enough sense that someone can help me.
<br>This is just an oversimplified model of my mouse input
<br>structure design.
<br>
<br>TIA for any help
<br>Lewis Townsend
<br></div></font></td>
</tr>
</table>
<p><hr>Get Free Email and Do More On The Web. Visit <a
------=_NextPart_001_2a367274_32cdefd7$6780ead5--
------=_NextPart_000_709faf61_32cdefd7$6780ead5
		
	 
	
		
		2. Re: mouse pointer graphics corruption
		
		
Lewis Townsend wrote:
> ... the changes are erased by the mouse updates...
Hide the mouse *before* writing to the screen, and then restore the mouse.
-- David Cuny
		
	 
	
		
		3. Re: mouse pointer graphics corruption
		
		
Thanks all for your help.
The problem is fixed.
Lewis Townsend
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com