Hi,

You could catch the close event in the same manner you use to catch mouse events, although you'll need to catch the close event for the Wx::Frame.

e.g.


my $mouseevthandler = Wx::EvtHandler->new;
EVT_MOUSE_EVENTS($evthandler, sub { 1 } );

my $closeevthandler = Wx::EvtHandler->new;
EVT_CLOSE($closeevthandler , sub {
        my($handler, $event) = @_;
        Wx::LogMessage('Splash Screen Closed');
        $event->Skip(1);
    });

my $splash = Wx::SplashScreen->new( Wx::Bitmap->new('my.png', wxBITMAP_TYPE_PNG),
   wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
   10000, undef, -1 );

$splash->GetSplashWindow->PushEventHandler($mouseevthandler);

$splash->PushEventHandler($otherevthandler);

........... at some point ...

$mouseevthandler->Destroy;
$closeevthandler->Destroy;


H.T.H.

Mark






On 27/10/2010 12:08, Alexander wrote:
Hello all!

I try to handle Exit event by SplashScreen, and have nothing;
I try use wxSplashScreen::OnCloseWindow and have error Can't locate
object method "OnCloseWindow" via package "Wx::Window" at
C:/Perl/!My/FTT/Res/Dialog/Splash.pm line 30.
i try add EVT_CLOSE and it not work.
How i can know what splash destroy?

Reply via email to