Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Same program: QuickWin and Console

Mike_Prager
Beginner
1,680 Views
I compile my program (from the same source) two ways: as a standard console program and as a QuickWin program. Experienced users prefer the console, students prefer the QuickWin version, which lets them drag & drop input files.

Issue: The default font and color scheme provided by QuickWin are not very attractive. I am wondering if there is a way around this. For example, could I USE the QuickWin module in the source, then detect whether the program is a QuickWin one, and if so, call the QuickWin routines to change the Window font and/or colors?

I suppose this would work only if (1) the USE statement in the source will not cause a problem when it's a console compilation and (2) if there is a way for a program to detect whether it is a console or QuickWin program.

Thanks,
Mike

P.S. Moving from Lahey LF95, I enjoy the better speed of ifort and availability of basic F2003 features. However, the Fujitsu equivalent to QuickWin provides a significantly more legible display. Perhaps that can be improved in the next release of ifort?
0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,680 Views
The USE on its own will not cause a problem, though some of the calls may not resolve if you build a console application. I'm sure it's possible to detect the difference, but I don't know what that would be offhand. Perhaps calling GetForegroundWindow and doing some sort of test on the result might be helpful. Other readers here might know.

I have not before seen a complaint about the legibility of QuickWin windows. You can certainly change colors and fonts.
0 Kudos
Mike_Prager
Beginner
1,680 Views

Steve,

Thanks for the reply. Perhaps another user will have an idea of the easiest way to detect QuickWin.

Regarding legibility, I was planning to attach a screen capture that shows both outputs. However, I couldn't find a way to do that.

What I planned to say: This is clearly a matter of degree and aesthetics, not legible vs. illegible. I find the black sans-serif font on white (Fujitsu) easier to read than the white serif font on black (Intel). Also, F. uses a proportionally spaced font, while I. uses monospaced, and there is plenty of room to argue for either choice as the default. Therefore, my desire to learn a little more about QuickWin so that I can change the font and colors from the default.

If I weren't determined to maintain compatibility with pure console operation, I would make more use of QuickWin -- for example, to display the output file for the user's inspection in a second window. It seems like a really nice facility.

Regards,
Mike

0 Kudos
Steven_L_Intel1
Employee
1,680 Views
You can put screenshots in a ZIP file and attach it using the Options tab when you reply. I'd like to see an example of what Lahey provides. Is it really QuickWin like in that you do normal Fortran I/O and it appears in the window, or do you make library calls?

QuickWin is very old - it originated with MS Fortran PowerStation 1.0 I think, and the DOS-orientation is partly why it looks the way it does. It is easy to change colors and fonts, though. Perhaps a different default font might be appropriate nowadays.
0 Kudos
Mike_Prager
Beginner
1,680 Views
Screen shot attached.

Yes, the Fujitsu version is similar to QuickWin. It displays ordinary Fortran I/O to a window. It is a simple linker option.


0 Kudos
Steven_L_Intel1
Employee
1,680 Views
Interesting - thanks. BTW, which NOAA facility are you from?
0 Kudos
Les_Neilson
Valued Contributor II
1,680 Views

I have not done any QuickWin programming but do the following also apply to the console window ?

SETBKCOLOR - set background colour
SETTEXTCOLOR
CLEARSCREEN

From the documentation

"Changing the background color index does not change the screen immediately. The change becomes effective when CLEARSCREEN is executed or when doing text input or output, such as with READ, WRITE, or OUTTEXT."

Les

0 Kudos
Steven_L_Intel1
Employee
1,680 Views
Les,

Those routines are valid in QuickWin applications only. In the documentation for each routine, you'll see a "Compatibility" section which lists the project types the routine is valid in. For these it says:

SETBKCOLOR (W*32, W*64)

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

I'd prefer to see some commas in there, but this means QuickWin (or a static library linked in with QuickWin) only. Standard Graphics is a type oif QuickWin app.
0 Kudos
Mike_Prager
Beginner
1,680 Views
Thanks, Les. It seems now all I need to do is find out how to detect whether QuickWin is active; i.e., the application type, from within the application.
0 Kudos
Mike_Prager
Beginner
1,680 Views
Steve Lionel:
BTW, which NOAA facility are you from?


Beaufort Laboratory (Beaufort, NC)
Southeast Fisheries Science Center
National Marine Fisheries Service
NOAA, US Dept. of Commerce
0 Kudos
Reply