1 Attachment(s)
[SOLVED] MFC project - remove extra options created by the wizard
Hi,
I am new to MFC and trying to make some extensions on an existing MFC project.
I am using VS 2010. The programmer used the MFC wizard to create this project and kept the options of visual style switching, and the "properties", "debug" and "file view" dock-able dialogs enabled. [Basically kept defaults switching only from MDI to SDI]
Screenshot:Attachment 30083
Is there any way I can get rid of those? [Other than by clicking close manually]
Re: MFC project - remove extra options created by the wizard
If you want a plain simple 1 window application:
Create a different type of project that doesn't have the docking interface. But just has the 1 SDI window.
If you want the docked interface, but not the "sample" dockable windows provided...
Remove the .h and .cpp files of the respective undesired dockable windows from the project and delete the files. Compile, and fix/remove any remaining references to the now removed dockable windows in other sources.
Re: MFC project - remove extra options created by the wizard
I removed the .cpp n .h files. At compile I only get linker errors. How do I solve that?
Re: MFC project - remove extra options created by the wizard
Did you do the Rebuild <your project>? (from the menu Build)?
What linker errors did you get?
1 Attachment(s)
Re: MFC project - remove extra options created by the wizard
Code:
Error 256 error LNK1120: 2 unresolved externals H:\shaunak\Projects\Sar_CCD_fork_18July\Debug\Sar_CCD.exe Sar_CCD
Error 255 error LNK2019: unresolved external symbol "public: __thiscall CPropertiesWnd::CPropertiesWnd(void)" (??0CPropertiesWnd@@QAE@XZ) referenced in function "protected: __thiscall CMainFrame::CMainFrame(void)" (??0CMainFrame@@IAE@XZ) H:\shaunak\Projects\Sar_CCD_fork_18July\Sar_CCD\MainFrm.obj Sar_CCD
Error 254 error LNK2019: unresolved external symbol "public: virtual __thiscall CPropertiesWnd::~CPropertiesWnd(void)" (??1CPropertiesWnd@@UAE@XZ) referenced in function __unwindfunclet$??0CMainFrame@@IAE@XZ$0 H:\shaunak\Projects\Sar_CCD_fork_18July\Sar_CCD\MainFrm.obj Sar_CCD
257 IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxver_.h 81 3
Im attaching a screenshot so its easier to read [Please right click and see full image]
Attachment 30099
Re: MFC project - remove extra options created by the wizard
Quote:
Originally Posted by
shaunakde
Code:
Error 256 error LNK1120: 2 unresolved externals H:\shaunak\Projects\Sar_CCD_fork_18July\Debug\Sar_CCD.exe Sar_CCD
Error 255 error LNK2019: unresolved external symbol "public: __thiscall CPropertiesWnd::CPropertiesWnd(void)" (??0CPropertiesWnd@@QAE@XZ) referenced in function "protected: __thiscall CMainFrame::CMainFrame(void)" (??0CMainFrame@@IAE@XZ) H:\shaunak\Projects\Sar_CCD_fork_18July\Sar_CCD\MainFrm.obj Sar_CCD
Error 254 error LNK2019: unresolved external symbol "public: virtual __thiscall CPropertiesWnd::~CPropertiesWnd(void)" (??1CPropertiesWnd@@UAE@XZ) referenced in function __unwindfunclet$??0CMainFrame@@IAE@XZ$0 H:\shaunak\Projects\Sar_CCD_fork_18July\Sar_CCD\MainFrm.obj Sar_CCD
257 IntelliSense: #error directive: Please use the /MD switch for _AFXDLL builds c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxver_.h 81 3
Im attaching a screenshot so its easier to read
Well, your screenshot does not provide any additional useful info.
So, again:
Quote:
Originally Posted by Victor
Did you do the Rebuild <your project>? (from the menu Build)?
If you did then the next question: is CPropertiesWnd is defined in some of the files you removed from the project? If "yes" - then please, remove all the CPropertiesWnd references too.
Re: MFC project - remove extra options created by the wizard
I created a new test project to understand how to to this. I delete the files, before using the "Find all references" command and commenting out all references.
It works fine on the test project but I am unable to compile the main project. It keeps generating linker errors.
EDIT: I deleted the debug and release directories, moved the project folder to another location and recompiled. It worked.
Thank you for all the help and I apologize for how stupid the question was.
Re: MFC project - remove extra options created by the wizard
Quote:
Originally Posted by
shaunakde
[COLOR="#D3D3D3"]Thank you for all the help and I apologize for how stupid the question was.
If you learned something from this, it was not a stupid question.
I've been doing C/C++ for many years, and I still ask questions someone else might think are "easy to answer". That doesn't make the question stupid.