Caution: This version of this document is no longer maintained. For the latest documentation, see


Initiate modal-window processing


void PtModalStart ( void );




This function initiates modal processing. To do so, it holds the current process loop so that another subloop can be started. This is needed so that the “current event” before the loop is the same as after.

Once the subloop is complete, you must call PtModalEnd() to resume processing of the initial process loop.

Note: If you want the parent or any windows in the application to refuse input while the modal dialog is displayed, you need to block them programmatically by setting the Pt_BLOCKED flag.

We recommend using PtModalBlock() and PtModalUnblock() instead of a PtModalStart() / PtProcessEvent() / PtModalEnd() loop. PtModalBlock() makes it easier for you to write modal code that's compatible with multithreaded applications.



Interrupt handler No
Signal handler No
Thread No

See also:

PtModalBlock(), PtModalEnd(), PtModalUnblock(), PtProcessEvent()

Modal dialogs in the Window Management chapter of the Photon Programmer's Guide