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

Disappearing graphics window

WSinc
New Contributor I
782 Views
Hello -

When I set a breakpoint and it goes there, it appears that the only way to see a graphics window is to put the mouse on the taskbar. But I have to LEAVE it there or the window disappears.

So that means I can't do anything with the window, i.e.can't copy resize, or scroll it, etc.
This is for debugging purposes mostly.

Is there a way around this? I have to resort to putting a read statement where I want execution to stop,
then the window stays put. But then that defeats the point of having a breakpoint there.

I am using Windows 7.
0 Kudos
4 Replies
Paul_Curtis
Valued Contributor I
782 Views
[bash]SUBROUTINE Set_Topmost (hwnd)
    IMPLICIT NONE
    INTEGER(HANDLE), INTENT(IN)     :: hwnd
    INTEGER                         :: rval
    rval = SetWindowPos (hwnd,HWND_TOPMOST,0,0,0,0,IOR(SWP_NOSIZE,SWP_NOMOVE))
END SUBROUTINE Set_Topmost
[/bash]
0 Kudos
Steven_L_Intel1
Employee
782 Views
The problem is that when you hit a breakpoint, all threads in your program stop, including the one responding to Windows messages to repaint, etc. It's a general problem debugging windowing applications and one without a really good solution. What I sometimes do is move the graphics window to be beside the Visual Studio window, so that when the program pauses, I can see what was in the window and not have it obscured by the debugger.
0 Kudos
WSinc
New Contributor I
782 Views
But then you still can't actually do anything with it, right?

I would like to be able to scroll the contents down to catch info that
appeared before. Or print out the contents, etc.

Is there a way to fake it out with a background process that keeps the window alive?

Yours; Bill S.
0 Kudos
Steven_L_Intel1
Employee
782 Views
Correct - you can't do anything with it and as soon as you overlap it with another window, you lose what was there. If you're using a console window, no problem, but QuickWin or a windowing app (where your program manages the windows) will have this problem.

I don't know how you could "fake it out" unless you structured your application into separate processes, which is a major undertaking.
0 Kudos
Reply