Why this thing ships with its own GetConsoleWindow function I don't understand. Rename it and make the rest of the code use it. Compiles fine on gcc 3.x and msvc6 and works properly.

svn path=/trunk/; revision=17553
This commit is contained in:
Steven Edwards 2005-08-25 23:54:39 +00:00
parent 8fcad79576
commit f4668aceae
3 changed files with 5 additions and 5 deletions

View file

@ -78,7 +78,7 @@ void Telnet::DoInit() {
telSetConsoleTitle("No Connection");
// Change the icon
hConsoleWindow = GetConsoleWindow();
hConsoleWindow = TelnetGetConsoleWindow();
iconChange = SetIcon(hConsoleWindow, 0, &oldBIcon, &oldSIcon, ini.get_startdir());
if (WSAStartup(MAKEWORD(1, 1), &WsaData)) {
@ -105,7 +105,7 @@ MapLoader(KeyTrans, Charmap),
Console(GetStdHandle(STD_OUTPUT_HANDLE)),
TelHandler(Network, Console, Parser),
ThreadParams(TelHandler),
Clipboard(GetConsoleWindow(), Network),
Clipboard(TelnetGetConsoleWindow(), Network),
Mouse(Clipboard),
Scroller(Mouse, ini.get_scroll_size()),
Parser(Console, KeyTrans, Scroller, Network, Charmap) {
@ -117,7 +117,7 @@ MapLoader(KeyTrans, Charmap),
Console(GetStdHandle(STD_OUTPUT_HANDLE)),
TelHandler(Network, Console, Parser),
ThreadParams(TelHandler),
Clipboard(GetConsoleWindow(), Network),
Clipboard(TelnetGetConsoleWindow(), Network),
Mouse(Clipboard),
Scroller(Mouse, ini.get_scroll_size()),
Parser(Console, KeyTrans, Scroller, Network, Charmap) {

View file

@ -110,7 +110,7 @@ int GetWin32Version(void) {
// Paul Brannan 8/7/98
// This code is from Michael 'Hacker' Krelin (author of KINSole)
// (slightly modified)
HWND GetConsoleWindow() {
HWND TelnetGetConsoleWindow() {
DWORD pid = GetCurrentProcessId(), wpid;
char title[512], *t = title;
HWND hrv = NULL;

View file

@ -9,7 +9,7 @@ BOOL SpawnProcess(char *cmd_line, PROCESS_INFORMATION *pi);
int GetWin32Version(void);
HWND GetConsoleWindow();
HWND TelnetGetConsoleWindow(void);
bool SetIcon(HWND hConsoleWindow, HANDLE hIcon, LPARAM *pOldBIcon, LPARAM *pOldSIcon,
const char *icondir);