How to wait on a modal dialog



In converting a non-event-driven application which works off of being able to wait for user input before continuing, I want to put up a modal dialog, and continue when I have the user's input. I have interpreted this as: Display the modal dialog, wait for an answer (using usleep), and return a value. (Is the best approach?)

When I implement this, the application hangs before finishing two other windows, and doesn't display the modal dialog. If I comment out the "wait for an answer" code, it displays, but without catching the answer.

Is there a good way to put up a modal dialog and wait for an answer?

--
++ Jonathan Hayward, jonathan hayward pobox com
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com

** If you'd like a Google Mail ( gmail.com) account, please tell me!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]