comp.lang.ada
 help / color / mirror / Atom feed
From: "David Botton" <David@Botton.com>
To: "comp.lang.ada mail to news gateway" <comp.lang.ada@ada.eu.org>
Subject: Re: What do I need to write a Windows program with Ada?
Date: Mon, 17 Mar 2003 14:23:38 -0500
Date: 2003-03-17T14:23:38-05:00	[thread overview]
Message-ID: <mailman.0.1047929086.9488.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 3e75e88a$0$4088$4d4ebb8e@read.news.de.uu.net

> I know how to write a program with Ada and how to use X-Window (with
Motif)
> for Unix. Now I have a program (smal and non-commercial) that I want to
port
> from Unix to a Windows (98 or 2000) environment and give it a Windows-GUI.
> It will use a menu, an explorer tree and some labels and buttons. The only
> problem is that I have no idea about programming for the Windows
> environment.

see http://www.adapower.com/windows for available Windows bindings, etc.

I recommend GWindows for Win32 - http://www.adapower.com/gwindows, see
http://www.adapower.com/gwindows/user_guide.html for a full tutorial. If you
can program Ada, you already know how to write a Windows program :-)

> What do I need to be able to write a program in Ada for Windows?
> -   Compiler
>     I have GNAT 3.15p installed.

My favorite choice.

>
> -   Description of a Windows API
>     What APIs are there, what is the difference and where do I get a
> description? Are there different levels like Xlib, Xt, Athena and Motif in
> Unix?

No. Windows API programming is flat. Using GWindows you will not need
knowledge of Win32.

> -   Where do I get a binding for a windows API?
>     GNAT comes with Win32Ada. Is that usable or are there other bindings
> that are easyer to use? I have heard that MFC is object-oriented for C++.
Is
> there an object-oriented binding for Ada?

Win32Ada is usable, but you probably don't want to be programming at that
level. GWindows is OO, but also offers non OO methods of use when needed.

> -   Do I need an C or C++ development environment for the Ada binding?
>     Does the binding require some special libraries that are not generaly
> available with Windows?

No. If you decide to create your own ActiveX objects you will need midl.exe
from Microsoft, but to us ActiveX controls, you can do that directly with
GWindows.

> -   Books
>     Is there a book you can recommend to read? I have started to read a
book
> about using MFC with C++ (from Microsoft Press). It gives me an idea about
> programming for Windows, but I can't test anything because it requires
> Visual C++ which I don't have.


If you are looking to learn the low level APIs you need Petzold's Windows
book, ie. a C programming book. I would recommend looking at the GWindows
sources as well for best practices in binding to Win32, etc.

To learn GWindows you have a full tutorial in the package and it can be
viewed on-line at http://www.adapower.com/gwindows/user_guide.html


> -   Do I miss something?

If you plan on doing Win32 programming long term, you should get a handle on
COM (ActiveX) as well by reading InsideCOM and playing with GNATCOM
(http://www.adapower.com/gnatcom).

David Botton




  parent reply	other threads:[~2003-03-17 19:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 15:23 What do I need to write a Windows program with Ada? Vincent Smeets
2003-03-17 15:29 ` Preben Randhol
2003-03-17 15:39 ` chris.danx
2003-03-17 15:48 ` Stephane Richard
2003-03-17 16:46   ` Ant
2003-03-17 17:24     ` Stephane Richard
2003-03-17 18:51       ` Ant
2003-03-17 19:41         ` Stephane Richard
2003-03-19 11:07           ` Ant
2003-03-17 17:19   ` Stephen Leake
2003-03-18  4:38   ` Bob Rosen
2003-03-17 18:31 ` tmoran
2003-03-17 21:28   ` Randy Brukardt
2003-03-17 19:23 ` David Botton [this message]
2003-03-18 19:10   ` David Gressett
2003-03-19  6:32 ` Vincent Smeets
  -- strict thread matches above, loose matches on Subject: below --
2003-03-19  1:24 David Botton
2003-03-19  3:20 ` Fionn mac Cuimhaill
replies disabled

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