【发布时间】:2016-08-27 22:09:16
【问题描述】:
LPCTSTR Process = ("Test game");
LPCTSTR windowName = Process(" Text");
system("color 0a");
SetConsoleTitle(windowName);
任何人都可以做这个吗?
【问题讨论】:
LPCTSTR Process = ("Test game");
LPCTSTR windowName = Process(" Text");
system("color 0a");
SetConsoleTitle(windowName);
任何人都可以做这个吗?
【问题讨论】:
要更改当前控制台标题,您可以使用SetConsoleTitle WinAPI 函数:
#include <iostream>
#include <Windows.h>
int main(){
wchar_t newTitle[255] = L"My New Console Title";
SetConsoleTitle(newTitle); // set the current console title
return 0;
}
【讨论】: