You mean the icon in the taskbar when the application is running? Why would you even be concerned about that? An MFC application has a dialog or window that is visible to the user then why not the icon in the task bar?
OK, for the sake of answering the question, when creating your main window (with CreateWindowEx API and not with CreateWindow macro), include in the extended window style the WS_EX_TOOLWINDOW. But you'll have title bar which is awkward for a main window. If you are using a dialog box as your main window, find in the dialog box's properties any property that corresponds to that extended style. In VC++ 6, it was a checkbox button in the extended window style page. In VC2010, it is a boolean property.
ITaskbarIcon interface give's you more control on what appears on the taskbar.