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.

Try checking out the <windows.h> functions

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.

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.

#include <windows.h>

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

No the functions in windows.h are for machines running a windows OS only.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.