From: James Van Buskirk on
"Philipp E. Weidmann" <philipp.weidmann(a)gmx.de> wrote in message
news:i0pj02$ij8$1(a)news.albasani.net...

> While some Fortran compilers, like Lahey
> (http://www.lahey.com/lf71/lfwin.htm), allow you to call the Windows API
> and therefore write GUI applications, I strongly advise you against it,
> because such programs will not compile with any compiler and might have
> cross-platform issues as well.

Actually, the problem with Windows API only arises in 32-bit Windows
because there are multiple calling conventions in that case and the
one needed to invoke Windows API functions is generally different
from the one a Fortran compiler uses.

This problem does not exist in 64-bit Windows because there is only one
calling convention there. In fact, the problem could be overcome in
32-bit Windows with C interoperability but the vendors have not chosen
to make that a workable solution.

Now, if cross-platform means also to other platforms than Windows,
then it goes without saying that extensive usage of Windows API
functions is a really bad idea.

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


From: e p chandler on
"Philipp E. Weidmann" <philipp.weidmann(a)gmx.de> wrote in message
news:i0pj02$ij8$1(a)news.albasani.net...
> Robin wrote:
>> How can I get started doing windows gui programming with fortran?

> While some Fortran compilers, like Lahey
> (http://www.lahey.com/lf71/lfwin.htm), allow you to call the Windows API
> and therefore write GUI applications, I strongly advise you against it,
> because such programs will not compile with any compiler and might have
> cross-platform issues as well.

IIRC Lahey compilers come with an introductory version of Winteracter. That
is a professional, cross platform product.

Silverfrost FTN95 comes with its own gigantic runtime library. It
essentially handles the GUI by sending character strings to a terminal
driver.

There are some low cost / free solutions.

DISLIN has widgets for GUI, but I've not used that package.
JAPI uses JAVA but is no longer being developed.
GrWin is windows sepcific but supports a large number of languages.
There is WxWidgets but it is Windows specific and does not have Fortran
interfaces.

> If you have a Fortran program and want to give it a graphical user
> interface, you are better off writing that in a language like Java or C++
> and making it communicate with your Fortran backend, e.g. using command
> line arguments or, better yet, files. Java applications run on amost any
> platform (so you will have not only a Windows GUI but one for other OSs as
> well), and the backend can be developed in standard-compliant Fortran,
> eliminating most (if not all) compatibility issues.

On Win32 I sometimes create a Fortran DLL and attach its functions to Excel
OR its subroutines to VBA or Delphi.

It also depends on the libraries available with your compiler. You can do
fairly low level, C style Windows GUI programming in the DVF/CVF/IVF family.
Or there are some simplified calls like MessageBox or QuickWin.

--- Elliot



From: Clive Page on
In message
<c40cf2d5-4262-4427-a4b1-6e4735093cc8(a)z10g2000yqb.googlegroups.com>,
feenberg <feenberg(a)gmail.com> writes
>On Jul 4, 4:07�am, Robin <rob...(a)cnsp.com> wrote:
>> How can I get started doing windows gui programming with fortran?
>>
>> Thanks......
>> -Robin
>
>I have been looking at DISLIN as a possibility for this - although
>mostly about scientific graphing, it has utility routines for some
>common interactive dialog boxes. See:
>
> http://www.mps.mpg.de/dislin/kap15.html#section_4
>
>If you try it out, I hope you will post information about your
>experience.

If it helps, I have posted some notes on using DISLIN to make a GUI for
Fortran. DISLIN provides only a limited selection of widgets, but it
has the advantage that it works on Windows (R) and Linux.

http://www.star.le.ac.uk/~cgp/dislinGUI.html

--
Clive Page
From: Lynn McGuire on
> There is WxWidgets but it is Windows specific and does not have Fortran interfaces.

WxWidgets supports several platforms other than Windows but it is C++ specific
with bindings for many languages (but Fortran is not one):
http://en.wikipedia.org/wiki/WxWidgets

Lynn


From: steve on
> There is WxWidgets but it is Windows specific

You may want to check the wxwidget home page before
making this statement.

"wxWidgets is a C++ library that lets developers create applications
for Windows, OS X, Linux and UNIX on 32-bit and 64-bit architectures
as well as several mobile platforms including Windows Mobile, iPhone
SDK and embedded GTK+."

--
steve