Is there any way to hide the main window (which is also modal) at startup (so that it does not display at all, in a way that the user will not see it until he requests it) in an MFC application? I've tried the SetWindowPos and ShowWindow(SW_HIDE) methods and none of them work. I've even set the dialog's visible property to false! Why does it still show up? Someone please tell me how to get this to work.