Is it possible to chage the title of a console window? Like instead of the file path to be like "My Program" or somehting?
Printable View
Is it possible to chage the title of a console window? Like instead of the file path to be like "My Program" or somehting?
Try this API
Quote:
SetConsoleTitle
The SetConsoleTitle function sets the title bar string for the current console window.
BOOL SetConsoleTitle(
LPCTSTR lpConsoleTitle // address of new title
);
Parameters
lpConsoleTitle
Pointer to a null-terminated string that contains the string to appear in the title bar of the console window.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
thanks a lot vlatko.
However, i get the following errors:
--------------------Configuration: passgen - Win32 Release--------------------
Compiling...
passgen.cpp
C:\Documents and Settings\Russell J. Funk\Desktop\passgen\passgen.cpp(26) : error C2373: 'SetConsoleTitleA' : redefinition; different type modifiers
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wincon.h(635) : see declaration of 'SetConsoleTitleA'
Error executing cl.exe.
passgen.exe - 1 error(s), 0 warning(s)
any ideas?
Never mind, i got it working! Thanks again vlatko for pointing me in the right direction.
Darn it! I spoke too soon!
I got the title working great, but now it still says "Select" in front of my title. does anyone know how to get rid of the "select"?
thanks
nevermind i fixed it