-
July 18th, 2012, 02:38 AM
#1
[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:
Is there any way I can get rid of those? [Other than by clicking close manually]
Last edited by shaunakde; July 19th, 2012 at 11:48 PM.
-
July 18th, 2012, 10:27 AM
#2
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.
-
July 18th, 2012, 10:26 PM
#3
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?
-
July 19th, 2012, 03:45 AM
#4
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?
Victor Nijegorodov
-
July 19th, 2012, 04:06 AM
#5
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]
Last edited by shaunakde; July 19th, 2012 at 04:10 AM.
-
July 19th, 2012, 04:21 AM
#6
Re: MFC project - remove extra options created by the wizard
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:
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.
Victor Nijegorodov
-
July 19th, 2012, 11:35 PM
#7
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.
Last edited by shaunakde; July 19th, 2012 at 11:42 PM.
Reason: Update on reply
-
July 22nd, 2012, 12:55 PM
#8
Re: MFC project - remove extra options created by the wizard
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|