Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Goober5000 on September 29, 2003, 01:56:00 am
-
So I'm adding a function to FRED to allow imports of FSM mission files. Everything's working quite nicely, except that if you have an existing mission open when you import, it keeps the old file name. Nothing I try seems to clear it - even doing clear_mission, reset_mission, etc. numerous ways doesn't touch the mission filename stored in memory somewhere. Needless to say, this is not desirable. Someone could be not paying attention when FRED asks to save changes to the old mission -- just hitting OK would overwrite everything.
I'm almost fresh out of ideas, but I thought I might be able to hack an MFC call to just run File->New. Trouble is, I can't find documentation anywhere that'll tell me how to do that. :mad: Any help?
-
I stumbled across a workaround, named something slightly different and hidden in the bowels of FRED. :rolleyes: :hopping:
-
So, Fred really is as mean-spirited and twisted inside as they say?
-
Nah, that's Microsoft. FRED is a pain, but that's only because it includes MFC (Microsoft Foundation Classes). Thanks to Volition's redundancy, if you can find a bit of code in FRED that does something similar to what you need, you can usually cut, paste, and hack until it works. Building something from scratch, on the other hand -- you haven't learned masochism until you've tried to read a Microsoft help file.
Excerpt from a particularly infuriating help file I ran across when I was trying to puzzle out a problem in Access this summer...[b]OpenRecordset Method[/b]
Creates a new Recordset object and appends it to the Recordsets collection.
[b]Syntax[/b]
[b]Set[/b] [i]recordset = object.[/i][b]OpenRecordset[/b][i](source, type, options, lockedits)[/i]
...
You can use one of the following constants for the [i]type[/i] argument.
Constant Description
-------- -----------
[b]dbOpenTable[/b] Opens a table-type [b]Recordset[/b] object
[b]dbOpenDynamic[/b] Opens a dynamic-type [b]Recordset[/b] object
[b]dbOpenDynaset[/b] Opens a dynaset-type [b]Recordset[/b] object
[b]dbOpenSnapshot[/b] Opens a snapshot-type [b]Recordset[/b] object
[b]dbOpenForwardOnly[/b] Opens a forward-only-type [b]Recordset[/b] object
...
I kid you not. You get a huge pile of information dumped on you that tells you precisely nothing. :doubt:
-
MFC = the suck
wxWindows = kicks ass [and is platform independant]
-
MFC? Hell, even BOOPSI was more easy to use ;)
(Free beer to the one who knows *that* old beast)
Cheers
-
*blatant lie*
I'm still using it. Honest.
where's my beer ?:hopping:
-
Originally posted by magatsu1
*blatant lie*
I'm still using it. Honest.
where's my beer ?:hopping:
So *what* is it? And on what Arch does it work? ;)
Cheers
-
Basic Object Oriented Programming System for Intuition