Home > Windows API > Change console application title!

Change console application title!

It’s easy to change the title of a console application, just call SetConsoleTitle with the new title.

Eg:

int main( int argc, char** argv)
{
     SetConsoleTitle("Nibu's console");
     return 0;
}

Well now the title changes, but you can see the old title for a moment before it changes to the new one (well at least I saw 😉 ), we can fix this problem by calling SetConsoleTitle before main is invoked.

Eg:

// Change console title here
const int nNotUsed = SetConsoleTitle( "Nibu's console");  

int main( int argc, char** argv)
{
     return 0;
}
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: