Your project name suggests that you have created a Win32 Console Application project and added the MFC stuff. What you need to create is a MFC Application project.
MFC can also be used in a console application, but then you would not show dialogs and you would need to initialize MFC first.