![]() Ofn%nFilterIndex = 1 ! Specifies initial filter value ![]() Ofn%hInstance = NULL ! For Win32 applications, you ! Initialize with an initial filespec, if any - null string ! Declare string variable to return the file specification. The list ends with a trailingĬharacter(*),parameter :: filter_spec = & ! is the file type name, the second is a semicolon-separated list Implicit none ! Declare structure used to pass and receive attributes ! PURPOSE, NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS. ! NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR ! THIS FILE IS PROVIDED “AS IS” WITH NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT ! SAMPLE SOURCE CODE - SUBJECT TO THE TERMS OF SAMPLE CODE LICENSE AGREEMENT, Here is the complete Intel code sample (I can’t get the whole thing to format as code): (Visual Studio is also not required to use the Windows API.) The code sample from requires some modules (Constant and Toolbar) that they must have created themselves, as those are not part of Intel Fortran. All that is necessary is a compiler that supports the STDCALL calling mechanism (on 32-bit only, not an issue on 64-bit), a declaration of the appropriate derived type, and linking against comdlg32.lib (part of the Windows SDK). It does, however, include predefined declarations that make it easier. I even got asked if I could improve the code/user experience further for Intel Fortran is not required to use the Windows API routines. ![]() The purpose of the program was to measure the surface tension of a liquid drop from a set of images and produce a small text report. As soon as I added the file selection dialog box, they found it much more convincing and easier to use. ![]() In the first iteration of the program I had a command-line interface, but the users (fellow scientists and master students), were not that happy to work with it. Recently, I did a project in MATLAB where I used the uigetfile function (“Open file selection dialog box”). While it might be difficult to get it to work across operating systems, a simple file dialog can be a very effective way to bring a program closer to the users.
0 Comments
Leave a Reply. |