As a side, you dont need to define constants or use win32 api:

use strict;
use warnings;

use Win32::GUI qw(WS_CAPTION TME_HOVER TME_LEAVE HOVER_DEFAULT SWP_FRAMECHANGED 
SWP_NOMOVE SWP_NOSIZE SWP_NOZORDER SWP_NOACTIVATE);

my $state = 0; # 0 - out; 1 - in;

my $mw = Win32::GUI::Window->new(
-title => "Vanishing Title Bar",
-pos => [100,100],
-size => [400,300],
-onMouseOver => sub {print "Hover\n"; return 0;},
-onMouseOut => \&Out,
-onMouseMove => \&Move,
);

$mw->Show();
Win32::GUI::Dialog();
exit(0);

sub Out
{
print "Out\n";
$mw->Change(-pushstyle => WS_CAPTION),
$mw->SetWindowPos(0, 0, 0, 0, 
0,SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
$state = 0;
return 0;
}

sub Move
{
return unless $state == 0;
$mw->Change(-popstyle => WS_CAPTION),
$mw->SetWindowPos( 0, 0, 0, 0, 
0,SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
print "In\n";
$state = 1;
$mw->TrackMouse(1000,TME_HOVER|TME_LEAVE);
return 1;
}


> From: w...@sao.pl
> To: perl-win32-gui-users@lists.sourceforge.net; jez_wh...@hotmail.com
> Subject: Re: [perl-win32-gui-users] I need mouse method!
> Date: Sat, 21 Mar 2009 11:17:05 +0100
> 
> 
> Oh Jeremy,
> 
> you are perfectly right! I am so inpatient!
> 
> Thank you for your help!
> 
> Waldemar.

_________________________________________________________________
All your Twitter and other social updates in one place 
http://clk.atdmt.com/UKM/go/137984870/direct/01/
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to