Re: Win32lib dialogs within proc's
- Posted by Matthew Lewis <MatthewL at KAPCOUSA.COM> Mar 10, 2000
- 418 views
> From: Irv Mullins > > Well, if your code sez: > openWindow(win,Modal) > puts(1,"Hello World") > ....etc > then of course it will open the window, and then continue > with the next line. > But that's just not good Windows event driven coding. > Actually, it's not Windows coding at all. > You can't write Windows programs like you write DOS programs. > It just doesn't work that way. > > Regards, > Irv > I have to disagree with you here. If that were the case, then getOpenFileName() wouldn't work the way it does. When you use this (whether you use David's wrapper, or use the API directly) any code that comes after the call assumes that the user has finished with the dialog. Depending on what type of app you're writing, you might not need this kind of behavior, but I can't see how to get around it without a huge mess of flags and extra procedures to really complicate the flow of the program. Besides, it makes things behave like stuff already built into windows (eg, open file dialog, message boxes). The more I think about it, the more I suspect that this should be a default behavior of Modal windows. If the user isn't allowed to do anything outside the window, why should the program? Unless you were multi-threading, which you can't do in Euphoria. Matt