Documentation: Message_PreQuit (Version #4)
Programmer’s Reference Manuals
» Part 7 – The Desktop
» The Window Manager
» Messages
» Message Codes
» Message_PreQuit
Message_PreQuit
(Code &8)
| Message Block | |
|---|---|
| +20 | Flag, bit 0 clear if desktop shutdown, otherwise set |
| Check block length – if < 20 assume a flag word of 0 |
Use
This message is used to notify a task that it is about to be Quit.
Notes
This message is sent to a specific task when the user tries to quit it from the task display menu.
This message is also broadcast to all tasks when the computer is being shut-down.
If the task has no objections to be quit, it should simply ignore the message. It will then receive a Message_Quit message.
An application that does not wish to quit, perhaps due to unsaved data, should acknowledge this message using Wimp_SendMessage, then open a dialogue box allowing the data to be first saved.
If bit 0 is unset. i.e. the message has been broadcast due to the system being shutdown. The application should re-start the shutdown process again. This can be easily achieved by emitting a Ctrl-Shit F12 key press using Wimp_ProcessKey.