Well when I run my program the bar at the top says C:\programing\C++\Test\Test.exe (<<just an example) How do I change this? And how do I make the console window look more XPish (I heard it was called luna). Answer the title one first please.


I wnt this too be all from a Console app no WinPrograming.

I understand about 9^-100000000 of windows.h could you at least tell me which 100 or so lines it is in?

try this:

#include <windows.h>

//Declare a 'handle' type object
HANDLE console_handle;

//Get the 'handle' of the console window
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);

//Change the title bar text
SetWindowText(console_handle, "I want to be the very best.");

Here is a reference for the SetWindowText() function.

Here is a reference for using basic windows functions in the DOS environment.

Edited 5 Years Ago by Clinton Portis: n/a

I thought this was cool so I put it in my code. For me, console_handle is in red. Error: argument of type "HANDLE" is incompatible with parameter of type "HWND"

btw if you do #include <windows.h) and in the main you put SetConsoleTitle("What ever you want"); that will be your title when the program debugs.

Exactaly how many lines of code are in windows.h man? And totAly worked will this work on Linux?

This question has already been answered. Start a new discussion instead.