|
|
|
|
|
by simiones
49 days ago
|
|
An "app" in Windows has always meant a process that starts with a WinMain() function. And as I said in other comments, a single app could always create multiple windows using the CreateWindow() function, that could each be independently closed (though not by Alt+F4). Nothing stops Windows in principle from having a way to close the entire application/process on pressing some keyboard shortcut regardless of which of its windows is currently in focus - they just didn't ever implement one. They could have defined a special message that the application's main message loop can handle to gracefully clean up everything, and then made a keyboard shortcut that would post this message, they just never did it. |
|
In 16-bit land, WinMain is an application entrypoint, and launching an already-open application again causes its WinMain to be invoked with hPrevInstance set to a non-NULL value. Here, the distinction between "process" and "application" was nonexistent/irrelevant.
In 32-bit land, WinMain is a process entrypoint, hPrevInstance is always NULL, and launching an already-open application again causes a new process to be spawned by the O/S. If the application wasn't coded for explicit coordination (using O/S-level mutexes or IPC mechanisms), then two or more running copies of the same application are not aware of each other, do not share any resources, and for a long time were not treated as a single "application" by the operating system.