It starts from the WinMain

WinMain calls the AfxWinMain which get your App object and calls its Application threads InitInstance