Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Win32 GUI Window Problem

by jplindstrom (Monsignor)
on Jan 28, 2009 at 13:43 UTC ( [id://739554]=note: print w/replies, xml ) Need Help??


in reply to Win32 GUI Window Problem

Don't call Win32::GUI::Dialog many times.

Create the windows, populate them, show them, and then call Win32::GUI::Dialog once. This is the main loop which runs until any event handler returns -1.

As it is now, the code will put up a window, wait for you to close it, then look at the next line.

Personally, I'd create a single window and add rows to a text area or something like that.

(If in the future you want to do something like tail -f you need to poll file handles IO::Select. Set up a timer to check if there's anything to read.)

Other resources

I think you need to read an intro to Win32::GUI, especially how event handlers work and how window names relate to them (this is a bit clunky in Win32::GUI).

There's a mailing list which may be able to provide better answers: win32-gui-users

There's a half finished tutorial which covers the basics about gui programming with Win32::GUI.

/J

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://739554]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found