| 7660 | |
| 7661 | |
| 7662 | void GuiType::Close() |
| 7663 | // If there is an OnClose event handler defined, launch it as a new thread. |
| 7664 | // In this case, don't close or hide the window. It's up to the handler to do that |
| 7665 | // if it wants to. |
| 7666 | // If there is no handler, treat it the same as Cancel(). |
| 7667 | { |
| 7668 | if (!IsMonitoring(GUI_EVENT_CLOSE)) |
| 7669 | return Cancel(); |
| 7670 | POST_AHK_GUI_ACTION(mHwnd, NO_CONTROL_INDEX, GUI_EVENT_CLOSE, NO_EVENT_INFO); |
| 7671 | // MsgSleep() is not done because "case AHK_GUI_ACTION" in GuiWindowProc() takes care of it. |
| 7672 | // See its comments for why. |
| 7673 | } |
| 7674 | |
| 7675 | |
| 7676 | |