MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / GetExitReasonString

Function GetExitReasonString

source/script2.cpp:9774–9796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9772
9773
9774LPTSTR GetExitReasonString(ExitReasons aExitReason)
9775{
9776 LPTSTR str;
9777 switch(aExitReason)
9778 {
9779 case EXIT_LOGOFF: str = _T("Logoff"); break;
9780 case EXIT_SHUTDOWN: str = _T("Shutdown"); break;
9781 // Since the below are all relatively rare, except WM_CLOSE perhaps, they are all included
9782 // as one word to cut down on the number of possible words (it's easier to write OnExit
9783 // functions to cover all possibilities if there are fewer of them).
9784 case EXIT_CRITICAL:
9785 case EXIT_DESTROY:
9786 case EXIT_CLOSE: str = _T("Close"); break;
9787 case EXIT_ERROR: str = _T("Error"); break;
9788 case EXIT_MENU: str = _T("Menu"); break; // Standard menu, not a user-defined menu.
9789 case EXIT_EXIT: str = _T("Exit"); break; // ExitApp or Exit command.
9790 case EXIT_RELOAD: str = _T("Reload"); break;
9791 case EXIT_SINGLEINSTANCE: str = _T("Single"); break;
9792 default: // EXIT_NONE or unknown value (unknown would be considered a bug if it ever happened).
9793 str = _T("");
9794 }
9795 return str;
9796}
9797
9798
9799

Callers 1

ExitAppMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected