![]() It's a special type of input, nothing more. The first is that the event loop is a linear thing: you don't process event #2 until you're finished processing event #1.Īnd the second is that a WM_CLOSE message does not "quit the program". There are two things to keep in mind here. At the heart of the code for essentially every program driven by external input, including games, is what's known as an event loop, which checks for input on the event queue, processes it, then repeats the last two steps in a loop forever until it's time to shut down. The event queue, as the name indicates, is a queue of events for the program to process this mostly consists of input from the user. While it's possible to come up with a hypothetical situation in which pressing Alt+ F4 would corrupt a save in progress, actually doing so would require the developers to quite deliberately go out of their way to screw up the saving system.įrom a coding perspective, the user pressing Alt+ F4 does not "close the active window," nor does it "interrupt the program." What it does is cause Windows to place a WM_CLOSE message onto the program's event queue. ![]() As a programmer, both answers posted so far are incorrect. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |