Well your program ends just after the return whatever; at the end of your WinMain function. Make sure that your program hasn't got stuck in an infinite message loop