how to change the name of MFC application
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: how to change the name of MFC application

  1. #1
    Join Date
    Mar 2010
    Posts
    5

    Unhappy how to change the name of MFC application

    i downloaded a Visual C++ project from net.Now i want to change the name of the window form or the application that runs when i click debug.
    i tried changing the name through the properties window of the form,but it didnt helped.plzzz iam in great need to get this issue solved.help me..!!!

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,068

    Re: how to change the name of MFC application

    The linker settings will let you specify the name of the executable file.

  3. #3
    Join Date
    Mar 2010
    Posts
    5

    Re: how to change the name of MFC application

    i already have specified the desired name of the executable file. Still it is showing the original name of the downloaded project on the top left corner of the executable window form. i need to change that...!!!

  4. #4
    Join Date
    Aug 2006
    Posts
    508

    Re: how to change the name of MFC application

    What GCDEF suggested should work. You should be able to go into project properties >> linker >> General and change the 'output file' name.

  5. #5
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: how to change the name of MFC application

    Two things:
    * Is it a .NET application? Then you are on wrong forum.
    * Do you mean the title of window? Or the name of EXE you want to run/debug?
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  6. #6
    Join Date
    Aug 2006
    Posts
    508

    Re: how to change the name of MFC application

    There is another way to change the name of project in class view and it will change executable name as well. You will have to edit .vcprj file and change the 'Name' field.
    Code:
    <?xml version="1.0" encoding="Windows-1252"?>
    <VisualStudioProject
    ProjectType="Visual C++"
    Version="8.00"
    Name="YourNewProjectName"

    The nice thing about it is it changes it in class view as well.

  7. #7
    Join Date
    Mar 2010
    Posts
    5

    Unhappy Re: how to change the name of MFC application

    @ zspirit: where to find the .vcprj file???
    @ Ajay Vijay: its not a .NET application.
    i want to change the name of the form that appears on the top left hand corner when the project runs(the title of the window)

  8. #8
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: how to change the name of MFC application

    SetWindowText

    is the method. But where you need to call (for which window object), you need to tell the type of application. Look for InitInstance, and find which window is being set as main window.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  9. #9
    Join Date
    Mar 2010
    Posts
    5

    Unhappy Re: how to change the name of MFC application

    the VC++ project that iam building and debugging should create a .exe file(application) automatically,but it is not doing so.On building it gives the error "the system cannot find the file specified(.exe)"

  10. #10
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: how to change the name of MFC application

    You are giving vague problems. First let us know what is your problem. If you are facing multiple issues, list and solve them one by one.

    Check the LINKER setting, where the EXE is being generated.
    Check the GENERAL setting, what is command line.
    Both must match.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  11. #11
    Join Date
    Mar 2010
    Posts
    5

    Re: how to change the name of MFC application

    today i tried once again n changed the title of the window form the properties of the form and it was successful..!!!
    @Ajay Vijay:thanks for your support and patience...i worked upon what u said about the linker and general setting. i was doing a silly mistake in giving a space in the name of the application.this was preventing it from proper functioning.
    thanks a lot everyone...problem solved...!!!

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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center