From: David Webber on

"SteveR" <maxsrussellatremovethisembarqmail.com> wrote in message
news:OMFasGaFLHA.4516(a)TK2MSFTNGP04.phx.gbl...

> Joe is getting to the heart of my vague question. I actually want the same
> view, with all the code that is in common. I say this as an example of
> just how much alike these two applications will be. In the meantime, I
> have chosen to use the exact same project and output the appropriate exe's
> according to how I set AFX_IDS_APP_TITLE, also of course making
> distinctions between products by testing for certain attributes in the
> code. This is the method I have used for years to produce very similar
> applications.

I did this years ago with my music software. I have two exes, one for the
music editor, and one for the free viewer (an app which views the documents
and does a few other things but doesn't edit them). Common code (including
drawing) is in an MFC extension DLL. The two exes and the DLL are all in
the same 'solution' (yes I preferred it when it was called a workspace too
<g>) with the appropriate dependencies set.

My various windows are tipified by the View with

CMozartView : CMusView (exe 1)
CMozartViewerView : CMusView (exe2)

CMusView : CView (DLL)

All the drawing (and a lot of other stuff) is done by CMusView. (

I try to avoid duplicating source code as it is a headache to maintain.)

Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: David Wilkinson on
SteveR wrote:
> Thank you, David and Joe.
>
> Joe is getting to the heart of my vague question. I actually want the same
> view, with all the code that is in common. I say this as an example of just
> how much alike these two applications will be. In the meantime, I have
> chosen to use the exact same project and output the appropriate exe's
> according to how I set AFX_IDS_APP_TITLE, also of course making distinctions
> between products by testing for certain attributes in the code. This is the
> method I have used for years to produce very similar applications.

If you are just talking about different versions of essentially the same
application (say Normal and Lite) then I would just use different builds of the
same project (say Normal Release, Normal Debug, Lite Release, Lite Debug). You
can control what you get using pre-processor settings in the settings for each
build.

I have been doing this for years, and it works well.

--
David Wilkinson
Visual C++ MVP
First  |  Prev  | 
Pages: 1 2
Prev: Off for a while
Next: PlaySound Question