>WH> I'm starting to learn programming in Windows. I want to write a program
>WH> in BC++ that will run under Windows or DOS. I know that there is a stub
>WH> in a Windows program that normally displays "This program needs Windows 3.1"
>WH> or something like that. Also, can the Dos part of the program utilize
>WH> VROOM for overlays? I want to put the code into a DLL for the Windows part
>WH> and then put it in an overlay for the Dos part.
>The only thing I've seen done is have two programs, one DOS and one
>Windows, bound into one exe file. The appropriate one is run based upon
>the environment. Setup.exe from MS is like this. Exactly how you
>go about doing this, I'm not sure.
When you link your Windows program, put 'STUB MYPROG.EXE' in the .DEF
file, and 'MYPROG.EXE' will be linked in as the stub to be run when
the Windows program is run from DOS. Note that your DOS program must
be less than 64K in size. Also be aware that it is the DOS program
which is run if you try to run the program from a Windows DOS box.
I use this technique to fire up Windows (if it is found) if my Windows
apps are run from outside Windows - a behaviour I find a *lot* more
friendly than the standard "need Windows" demand.
Paul Bennett _ onewhe
Under disguise at BT's LEC until September /|\ twowhe