Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi there.

I have been working on a project made in MFC/C++ in Visual Studio 2012 and al seem to work perfectly, the only issue is that when I press the button "run/compile" in VS 2012 the main window (what I have called "main form") displays the original name of the app in te very top of the window.

What I want to do is rename this form and keep all the other features that I have been work at; does anyone know how to perfom this taks? Thanks in advanced.

My best regards.
Michael
Posted

1 solution

You can always call SetWindowText on the window HWND to set its title: https://msdn.microsoft.com/en-us/library/windows/desktop/ms633546%28v=vs.85%29.aspx[^].

Yes, for a top-level (popup) window it will set its title in the title bar, nothing else. For other windows (controls) it will set some text.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900