ctrl-f4 is used in MDI applications to close one document window of a multi-document application. alt-f4 to close the whole application.

Well, I say "is used", but nothing in Windows is consistent anymore. Especially since web browsers started disrespecting the OS shortcuts. Now it seems like every application follows the web browser UI conventions instead of OS ones.

Alt+F4 in Windows has always been "close window", not close app. It is even shown on the traditional "application icon" menu on each window, that many new apps are unfortunately doing away with.

> Alt+F4 in Windows has always been "close window", not close app.

Well, if we're talking about traditional Windows behavior, there's no such thing as an app in the first place.

Some programs allowed multiple windows to be open at the same time (e.g. Notepad), and some didn't (e.g. Paint), but for those that did, they spawned each window as its own process. Closing the window closed the process. That two processes shared the same executable had no deeper meaning until Windows XP added taskbar grouping.

In Win16 all instances of executable shared memory (that's why there's hInstance in WinMain). But that should be transparent to user if implemented correctly.

Except Excel, which wants to act like single application with multiple windows.

Console applications, which do not have win32 windows with message pumps can be closed with alt-f4.

For GUI apps it sends a WM_CLOSE, because that's they way to "close" a GUI application.

For console applications it sends a message through the "Console control handler". Which the console subsystem no longer lets the application properly handle and kills the process summarily anyway.

Note that I keep saying "application" because that has been the terminology in windows forever. "GUI apps" and "console apps" were a thing before mobile.

This is good detail, but I wasn't comparing to mobile, I was comparing to Macintosh. A native app on Windows has always been more of a loose collection of related files, whereas it is a single file on Macs and is presented as a cohesive unit throughout the operating system. Thus, Cmd+Q was more feasible than a similar shortcut could have been on Windows, and Alt+F4 really was its closest equivalent because Windows didn't organize things the way Mac did.