MouseMove returns the label, and the x, y coordinates of the mouse, right?
----- Original Message -----
From: "Jeremy White" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Tuesday, August 16, 2005 7:05 AM
Subject: Re: [perl-win32-gui-users] Re: Draggable 'window' [Was: MDIFrame
and background Image]
Thanks Jez. Your suggestions seems to work except for the last thing. As
I move the cursor over windows, how do I repaint windows that no longer
have the cursor over them? Is there a way to get all the windows to
repaint? Disposing of the DC did not seem to do this?
Releasing the DC wouldn't force a redraw. If you want to redraw a window,
a couple of functions in Win32::GUI should help, InvalidateRect and
Redraw. Both functions can be called as functions with the first parm
being the window handle (behind the scenes, InvalidateRect calls the MS
API InvalidateRect while Redraw calls RedrawWindow just in case you wanted
to look them up).
It should be relatively simple logic to redraw a window once the cursor
has left it, although I think in some cases you might have to do a full
refresh with:
Win32::GUI::InvalidateRect(0,0);
Adding this to your example seems to work - although I think your
coordinate system with the cursor is slightly out of sync?
Cheers,
jez.
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date: 8/15/2005