From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,899b6cda699de8ba X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-17 11:24:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "David Botton" Newsgroups: comp.lang.ada Subject: Re: What do I need to write a Windows program with Ada? Date: Mon, 17 Mar 2003 14:23:38 -0500 Organization: ENST, France Message-ID: References: <3e75e88a$0$4088$4d4ebb8e@read.news.de.uu.net> Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1047929086 87980 137.194.161.2 (17 Mar 2003 19:24:46 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 17 Mar 2003 19:24:46 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: X-pair-Authenticated: 216.77.216.54 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:35418 Date: 2003-03-17T14:23:38-05:00 > 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