comp.lang.ada
 help / color / mirror / Atom feed
* Ada / Visual C++ Integration
@ 2000-03-24  0:00 haughton1228
  2000-03-24  0:00 ` Ed Falis
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: haughton1228 @ 2000-03-24  0:00 UTC (permalink / raw)


Any insight that anyone could offer would be greatly appreciated.

First some background.	We currently have an application implemented on a DEC
Alpha Unix platform, developed utilizing Rational Apex as our Ada IDE and
UIMX as our C-based X-Windows GUI generator.  We currently have thin bindings
between the Ada main programs and the C GUIs. We rename the C main to c_main
and call it at instantiation of the Ada executable to bring up the initial
display. Logic to support the displays is written either in C or Ada, with
the necessary externs and imports/exports to make this all work.

I am trying to understand how to set up a similar environment in the NT
world.	We would like to use Microsoft Visual C++ and MFC to re-create the
GUI (~100 non-trivial displays), adapt supporting C/C++ code from X-Windows
to Windows, and port the Ada code to the NT platform with as little change as
possible. Theoretically, with the right bindings and compiler/linker options,
I should be able to compile the C++ gui and Ada code and link the resulting
objects together into a single Ada executable. I have been prototyping using
GNU Ada.  The Win32Ada bindings there only implement the Win32 APIs, not MFC,
so I'm thinking that this would force me to use the lower level Win32 APIs to
interact with all of the MFC graphical objects created by VC++. The
documentation gives enough info to make me believe that this is possible, but
I haven't succeeded in making it work.

Another option could be to  use AFC bindings provided as part of Aonix
ObjectAda to write an Ada MFC-based application from scratch (like the
Prosise examples), but can I use AFC to create an Ada executable with a MFC
front end created using the Visual C++ GUI builder? I have been looking in
comp.lang.ada, as well as www.gnat.com, www.aonix.com, and www.adapower.com
and microsoft sites, and haven't found this specific question answered.  Are
there any other resources (web, print, etc.) that you could recommend? Would
a 'native' Ada gui builder (such as the one available from Aonix) be a better
solution?

TIA,
Jim Haughton


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada / Visual C++ Integration
  2000-03-24  0:00 Ada / Visual C++ Integration haughton1228
@ 2000-03-24  0:00 ` Ed Falis
  2000-03-27  0:00 ` dmitry6243
  2000-03-31  0:00 ` David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Falis @ 2000-03-24  0:00 UTC (permalink / raw)


You could also look into glade/gtkAda as a possible solution that would
result in platform-independent code.  http://gtkada.eu.org/

- Ed  (ACT)

<haughton1228@my-deja.com> wrote in message
news:8bgahs$6m7$1@nnrp1.deja.com...
> Any insight that anyone could offer would be greatly appreciated.
>
> First some background. We currently have an application implemented on a
DEC
> Alpha Unix platform, developed utilizing Rational Apex as our Ada IDE and
> UIMX as our C-based X-Windows GUI generator.  We currently have thin
bindings
> between the Ada main programs and the C GUIs. We rename the C main to
c_main
> and call it at instantiation of the Ada executable to bring up the initial
> display. Logic to support the displays is written either in C or Ada, with
> the necessary externs and imports/exports to make this all work.
>
> I am trying to understand how to set up a similar environment in the NT
> world. We would like to use Microsoft Visual C++ and MFC to re-create the
> GUI (~100 non-trivial displays), adapt supporting C/C++ code from
X-Windows
> to Windows, and port the Ada code to the NT platform with as little change
as
> possible. Theoretically, with the right bindings and compiler/linker
options,
> I should be able to compile the C++ gui and Ada code and link the
resulting
> objects together into a single Ada executable. I have been prototyping
using
> GNU Ada.  The Win32Ada bindings there only implement the Win32 APIs, not
MFC,
> so I'm thinking that this would force me to use the lower level Win32 APIs
to
> interact with all of the MFC graphical objects created by VC++. The
> documentation gives enough info to make me believe that this is possible,
but
> I haven't succeeded in making it work.
>
> Another option could be to  use AFC bindings provided as part of Aonix
> ObjectAda to write an Ada MFC-based application from scratch (like the
> Prosise examples), but can I use AFC to create an Ada executable with a
MFC
> front end created using the Visual C++ GUI builder? I have been looking in
> comp.lang.ada, as well as www.gnat.com, www.aonix.com, and
www.adapower.com
> and microsoft sites, and haven't found this specific question answered.
Are
> there any other resources (web, print, etc.) that you could recommend?
Would
> a 'native' Ada gui builder (such as the one available from Aonix) be a
better
> solution?
>
> TIA,
> Jim Haughton
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada / Visual C++ Integration
  2000-03-24  0:00 Ada / Visual C++ Integration haughton1228
  2000-03-24  0:00 ` Ed Falis
@ 2000-03-27  0:00 ` dmitry6243
  2000-03-31  0:00 ` David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: dmitry6243 @ 2000-03-27  0:00 UTC (permalink / raw)


In article <8bgahs$6m7$1@nnrp1.deja.com>,
haughton1228@my-deja.com wrote:
> Any insight that anyone could offer would be greatly appreciated.
>
> I am trying to understand how to set up a similar environment in the
NT
> world.	We would like to use Microsoft Visual C++ and MFC to
re-create the
> GUI (~100 non-trivial displays), adapt supporting C/C++ code from
X-Windows
> to Windows, and port the Ada code to the NT platform with as little
change as
> possible. Theoretically, with the right bindings and compiler/linker
options,
> I should be able to compile the C++ gui and Ada code and link the
resulting
> objects together into a single Ada executable. I have been prototyping
using
> GNU Ada. The Win32Ada bindings there only implement the Win32 APIs,
not MFC,
> so I'm thinking that this would force me to use the lower level Win32
APIs to
> interact with all of the MFC graphical objects created by VC++. The
> documentation gives enough info to make me believe that this is
possible, but
> I haven't succeeded in making it work.

I suspect that you really need MFC. If you take a look at MFC's
graphical objects, you'll see that they are very thin wrappers around
Windows objects. Use Win32 directly. You can still use MSVC GUI builder,
however without "class wizard".

There is also another way. Write your own graphical primitives with MFC
or without it, make them have pure C interface and use the package
Interfaces.C to interact with.

Regards,
Dmitry Kazakov


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada / Visual C++ Integration
  2000-03-24  0:00 Ada / Visual C++ Integration haughton1228
  2000-03-24  0:00 ` Ed Falis
  2000-03-27  0:00 ` dmitry6243
@ 2000-03-31  0:00 ` David Botton
  2 siblings, 0 replies; 4+ messages in thread
From: David Botton @ 2000-03-31  0:00 UTC (permalink / raw)


It is possible to use OLE Automation and Ada together to easily accomplish
what you are looking to do. The MFC wizards will help you create all the
automation interfaces to the GUI. You then run BindCOM on the MFC executable
to create a binding to the automation interfaces for Ada and away you go.

I don't have time now to follow up with an example, but if you would like
send me an e-mail and I will give you a simple example or two, along with a
few other possible solutions.

COM is a natural (and easy for Ada :-) solution to multi language problems.
It also opens the ablity to have you run your GUIs remotely and other
machines then where your Ada code is running.

David Botton


haughton1228@my-deja.com wrote in message <8bgahs$6m7$1@nnrp1.deja.com>...
>I am trying to understand how to set up a similar environment in the NT
>world. We would like to use Microsoft Visual C++ and MFC to re-create the
>GUI (~100 non-trivial displays), adapt supporting C/C++ code from X-Windows
>to Windows, and port the Ada code to the NT platform with as little change
as
>possible.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-03-31  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-24  0:00 Ada / Visual C++ Integration haughton1228
2000-03-24  0:00 ` Ed Falis
2000-03-27  0:00 ` dmitry6243
2000-03-31  0:00 ` David Botton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox