Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] win32 client compiling troubles
Home

[Freeciv-Dev] win32 client compiling troubles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] win32 client compiling troubles
From: Christian Stock <cstock@xxxxxxxxxxxxxx>
Date: Thu, 27 Jun 2002 19:15:56 +1000

Ok, I had a go at the win32 client but now I'm stuck.

Firstly, I think I found 2 'bugs':

I don't remember 100% which function, but I think it was new_game_proc in connectdlg.c. It's declared as CALLBACK LONG, but really should be LONG CALLBACK. At least the vc compiler bails out, but is happy when LONG and CALLBACK are switched around.

I got a crash when the main menubar was created. I think the static struct my_meny main_menu[] in menu.c is not 100% correct. I added a second {NULL,0} at the and which makes sense, because the first one finishes the submenu and the second one I added will end the main menu bar. Otherwise, with the vc compiler, while(items[0]->name) is not NULL and the loop continues and crashes when it tries to continue the main menu with the empty item->name. You'd think the empty item->name would be NULL, but the VC compiler is quite fussy...

I'm still stuck in the init phase in ui_main. ShowWindow(root_window, SW_SHOWNORMAL) is the last statement that works (it shows the window with menubar), and then the UpdateWindow(root_window) crashes. I don't get it. I tested if root_window is NULL (which it isn't, and why would it? ShowWindows works). I also tried a if (!UpdateWindow(...)) GetLastError(), but it just crashes. I would have thought, that if UpdateWindows failed I'd at least get an error, but it really seems like root_window is suddenly empty. Or is there something else going berserk?

Cheers, Christian



[Prev in Thread] Current Thread [Next in Thread]