MFC project - remove extra options created by the wizard
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: MFC project - remove extra options created by the wizard

  1. #1
    Join Date
    Jul 2012
    Location
    Mumbai, INDIA
    Posts
    4

    [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:Name:  Capture.jpg
Views: 515
Size:  70.1 KB

    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.

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,920

    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.

  3. #3
    Join Date
    Jul 2012
    Location
    Mumbai, INDIA
    Posts
    4

    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?

  4. #4
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,418

    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

  5. #5
    Join Date
    Jul 2012
    Location
    Mumbai, INDIA
    Posts
    4

    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]

    Name:  Shpo.jpg
Views: 439
Size:  51.5 KB
    Last edited by shaunakde; July 19th, 2012 at 04:10 AM.

  6. #6
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,418

    Re: MFC project - remove extra options created by the wizard

    Quote Originally Posted by shaunakde View Post
    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.
    Victor Nijegorodov

  7. #7
    Join Date
    Jul 2012
    Location
    Mumbai, INDIA
    Posts
    4

    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

  8. #8
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,920

    Re: MFC project - remove extra options created by the wizard

    Quote Originally Posted by shaunakde View Post
    [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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center