Windows GUI applications written in C/C++ have 'WinMain' as an entry point (rather than 'main'). My understanding of this is that the compiler generates a 'main' function to be called by the C Runtime. This 'main' function sets up the necessary environment for the GUI and calls into 'WinMain' (specifying the instance handles etc.).
In short, I believe console and GUI application startup to differ in the following way:
Console application: C Runtime --> 'main' function (hand-coded)
GUI application: C Runtime --> 'main' function (compiler-generated) --> 'WinMain' function (hand-coded)
I would like to both validate this understanding and find out how I can hand-code a Windows GUI with just a 'main' function (i.e. without having to write 'WinMain').