[comp.os.msdos.programmer] MS Windows 3.0, X Windows and C++

bk19+@andrew.cmu.edu (Bradley D. Keister) (03/08/91)

I'm interested in hearing from those with experience in all of the
above.  I've spent about one year writing my research programs in C++.
I have essentially no experience with window environments, though I
have written screen interface code in C and Pascal.  I'd like to get a
sense of whether it's feasible to write interface code which could be
ported both to X (maybe Motif in particular) and MSW by encapsulating
the specifics of each into generic classes which could then be invoked
in higher-level modules.  I've seen product announcements for
commercial packages which may do this exactly, but my experience is
that large packages of this sort which "do everything" are rather
unwieldy for my purposes -- I'd rather "build from the ground up",
unless X and MSW are so intrinsically different that only large
commercial packages can address the problem.

Brad Keister
Physics Department
Carnegie Mellon U

please reply to:

keister@poincare.phys.cmu.edu

cadsi@ccad.uiowa.edu (CADSI) (03/08/91)

From article <gbpaive00Uh_01nmJ1@andrew.cmu.edu>, by bk19+@andrew.cmu.edu (Bradley D. Keister):

> I'm interested in hearing from those with experience in all of the
> above.  I've spent about one year writing my research programs in C++.
> I have essentially no experience with window environments, though I
> have written screen interface code in C and Pascal.  I'd like to get a
> sense of whether it's feasible to write interface code which could be
> ported both to X (maybe Motif in particular) and MSW by encapsulating
> the specifics of each into generic classes which could then be invoked
> in higher-level modules.  I've seen product announcements for
> commercial packages which may do this exactly, but my experience is
> that large packages of this sort which "do everything" are rather
> unwieldy for my purposes -- I'd rather "build from the ground up",
> unless X and MSW are so intrinsically different that only large
> commercial packages can address the problem.

One major difference is that there is no real XtIntrinsics level in
Windows.  You will have to deal with messages yourself.  Not to mention,
you don't get the XtAppMainLoop call, but Windows gets close.  The real
difference, like I said, is the event management.  Motif (layered above
the XtIntrinsics) does it for you, MS Windows does not.  Possibly Actor
does, but I am not all that familiar with Actor.  Anybody????

Concerning encapsulation???  I have ported (not without difficulty)
a complete interface from X11R3 to Windows.  It didn't kill me, but
let me say this, begin the encapsulation at the Window level.  ALL objects
classes are subclassed off the Window.  It seems wierd, but saves headaches.

						Tom Hite