I have written a nifty gui that I really like using the win32 gui
module. I really have to thank the person(S) who put this all together.
On to my question...
I would like to design a menu containing an exit routine but it is not
working. Currently I have this as my program loop
while (1)
{
Some repetitive code....
Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0);
exit(0) if !$W->IsEnabled();
}
exit(0);
And I have a quit button that exits with this code:
sub Quitb_Click { exit(0); }
Now this works great while it is a button. But when I try to make this
menu it does not work. Actually it does work, however; when I convert the
program to an exe and then click on the exit menu I get an error.
So reading a bit I figured that I need to change the menu to some thing
like this:
sub Exit_Click {$W->PostQuitMessage(0);}
Now I know that this sub is executing because I can put a print in it and I
will see it on the console window. However, it is not quitting the
program. How do I do that???
Thanks,
Louis
--
¤¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤
¤°`°Lightbridge, Inc
¤°`°67 South Bedford St.
¤°`°Burlington MA 01832
¤°`°781.359.4795 mailto:[EMAIL PROTECTED]
¤°`°http://www.lightbridge.com
¤¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤