Thank you! That was it.

I didn't put a SecondWin_Terminate subroutine, because I thought if I don't use it, it would be just like using it and returning 0 but if the default is -1, then I need to use it explicitly.

Thanks.

Octavian

----- Original Message ----- From: "Robert May" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Wednesday, June 20, 2007 10:05 PM
Subject: Re: [perl-win32-gui-users] creating a child window


On 20/06/07, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
I have tried to create a child window, but when I close it, the entire
application closes.

I open it with an option from the menu of the parent window that has
a -onClick => \&Config, and I returned 0 or 1 from the sub Config {}
subroutine, but the application still closes when closing that window.

Are there any samples of using child windows? Or can you tell me how to do
it?

I think you mean an owned window, and not a child window?  If so, then
there are examples in the demos (for example see the help menu option
in the NotifyIcon.pl demo).

You want the -onTerminate handler of the owned window to return 1 (by
default it returns -1, which exits the Dialog() processing).

If I'm mis-understanding you, then perhaps you could post a (small and
complete) example so that we can better understand what you are trying
to do.

Regards,
Rob.


Reply via email to