I'm working on an MFC application that has #ifdefs throughout the source code and in the rc files that produce several different output programs. Each of these programs differ from each other somewhat, but they share 90% of their code and resources in common.
Every time that we create a new program based on this code base, we do a fork in the revision control system, do the changes by introducing a new #ifdef regimen, and finally we painfully merge the program back into the main code source after the program has been released. It's a rather difficult to keep everything straight.
So, what I'm thinking about doing is creating a base class that holds the "application", and subclass for each different application. A factory method would then instantiate the right subclass based upon a configuration file or something. So far so good.
The problem comes with respect to DLLs and EXEs. I'm thinking that the base class, and the subclasses should reside in a DLL, not the main EXE, and that the main EXE should be skeletal. Does that make sense to anyone else?
This configuration thing with multiple programs from one MFC source is kind of tricky business.