Alt-F4 has been a universal app close shortcut since at least Windows 3.1. Ctrl-W is close Window, so it really only works to close a program if it's the last window of that program open.