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

Starting a Standard Graphics application windowed

Screeb
Beginner
1,087 Views
In this document: http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/win/compiler_f/lref_for/source_files/rfstwinc.htm, it says "Under Standard Graphics, the application attempts to start in Full Screen mode with no window decoration (window decoration includes scroll bars, menu bar, title bar, and message bar) so that the maximum resolution can be fully used. Otherwise, the application starts in a window. You can use ALT+ENTER at any time to toggle between the two modes."

So how do I make a Standard Graphics application start in windowed mode instead of full screen?

winfo.TYPE = QWIN$RESTORE
status = SETWSIZEQQ(QWIN$FRAMEWINDOW, winfo)

That doesn't do the trick.

I don't want to have toclick the screen or press alt-enter every time it's run. Or do I have to make itQuickWin to do that? In that case, how do I make a QuickWin app that behaves exactly like a Standard Graphics app - ie nowindow decoration except the title bar and borders?

And while I'm here - how do I change the title bar text? I can change the text of the child window with SETWINDOWCONFIG, but I can't see how to change the parent window text - it seems to automatically use the name of the exe.
0 Kudos
1 Solution
Paul_Curtis
Valued Contributor I
1,087 Views
If you can obtain your window's handle, you can use the SetWindowLong() API function to change the window's style; this gets the job done without requiring access to the window's actual proc function.

View solution in original post

0 Kudos
6 Replies
Steven_L_Intel1
Employee
1,087 Views
You can't change the style programmatically - you have to choose when you create the project (or at least select the Runtime Library type in the Fortran > Libraries properties page.)

Standard Graphics is meant to mimic a DOS system.
0 Kudos
Screeb
Beginner
1,087 Views
You can't change the style programmatically - you have to choose when you create the project (or at least select the Runtime Library type in the Fortran > Libraries properties page.)

Standard Graphics is meant to mimic a DOS system.

So it can't be done with Standard Graphics? Annoyingly I can get tantalisingly close by setting the window size to something extremely small (say 10x10) which forces the app to windowed mode, and then setting it back to the desired resolution. However, it has scrollbars when I do that. Hmm, it must be possible via the Windows API at least. But I think I'll stick with QuickWin or the scrollbarsin that case.

Does anyone know how to remove the child window's decorations, and the status bar,in QuickWin?

0 Kudos
Paul_Curtis
Valued Contributor I
1,088 Views
If you can obtain your window's handle, you can use the SetWindowLong() API function to change the window's style; this gets the job done without requiring access to the window's actual proc function.
0 Kudos
Screeb
Beginner
1,087 Views
Quoting Paul Curtis
If you can obtain your window's handle, you can use the SetWindowLong() API function to change the window's style; this gets the job done without requiring access to the window's actual proc function.


Yep, I've just found this solution with help from the Poker example program. Works like a charm! Cheers.

0 Kudos
jmloriot
Beginner
1,087 Views
I tried to build the poker example but I have a link error

Error1 fatal error LNK1104: cannot open file 'comsuppw.lib'LINK

and I have not been able to work it out
0 Kudos
Steven_L_Intel1
Employee
1,087 Views
An earlier release including Visual Studio 2008 Shell omitted this library. You can get it by downloading and installing the Microsoft Windows SDK or by uninstalling Fortran, the VS Shell and the VS Tools and Libraries for Fortran and then downloading a current "full" installer of Intel Visual Fortran.
0 Kudos
Reply