Dave's Brain

Browse - Programming Tips - How can I programatically change the title of a Command Line window?

Date: 2010may19
OS: Windows
Platform: Windows
Language: C/C++

Q.  How can I programatically change the title of a Command Line window?

A.  There is a built-in command:

title My Title
Or you can invoke it this way:
cmd /c title My Title
Or in C/C++ like this:
system("cmd /c title My Title");
But this is nicer (from a C/C++) program:
SetConsoleTitle("My Title");

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.