Subj : Re: DOS + GUI, possible? To : borland.public.cpp.borlandcpp From : Jan =?ISO-8859-15?Q?L=FChr?= Date : Sat Feb 14 2004 07:24 pm Greetings, Digital Man wrote: > To: "Roland Maver" > Re: DOS + GUI, possible? > By: "Roland Maver" to > borland.public.cpp.borlandcpp on Thu Jul 25 2002 02:16 pm > > > Is there any way to compile and link a program so that it runs both as > > a dos program under msdos and as a GUI app under Windows? > Well it wouldn't be a DOS program then, would it? Piuh. That's quite difficult. The point is, that the Windows-Architecture is 32-Bit while the DOS-One is 16-Bit. So writing this program (if it's quite trivial) is possible, BUT you have to compile two versions (for DOS and for Windows by using variois ifdef directives). But I'd rather recommend writing to different ones with the same backend. If you restrict the GUI to one file and use a nice makefile you can work with the same sources) After that, you can use a wrapper-batch to start the appropiate program. Keep smiling yanosz .