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

How to hide the parent window

tmcole
Beginner
1,976 Views
Back again.... I have gotten some dialog boxes to run successfully and am now trying to find a way to keep the parent QuickWin window from appearing. I want to handle all I/O to the program from dialogs. Any solutions?
0 Kudos
12 Replies
meistrv
Beginner
1,976 Views
This should work:

logical bret
bret=ShowWindow(ghWndMain,SW_HIDE)


To make the window visible again:

bret=ShowWindow(ghWndMain,SW_SHOW)


more parameters in help...

Vit
0 Kudos
tmcole
Beginner
1,976 Views
Thanks for the info, but this does not work in a CVF QuickWin project. This appears to be a call documented in the SDK. I tried it, but received an "unresolved external error". Any other suggestions?
0 Kudos
Steven_L_Intel1
Employee
1,976 Views
Sounds to me as if you don't want a QuickWin application at all. You want a "Fortran Windows Application" with its WinMain entry point. No windows unless you explicitly put them up.

Steve
0 Kudos
tmcole
Beginner
1,976 Views
Steve, thanks, but that is not what I really want to do. I have had a bitch of a time figuring out how to set up a Fortran Windows Application as there is no clear, concise description of what I have to do to get one running (such as what specifically the WinMain function requires) and I have not had the luxury of spending weeks/months stumbling around in the examples section before it starts to make sense.

So, I will ask again, is there any way to prevent, remove, hide the QuickWin window from appearing in a QuickWin application? Thanks.
0 Kudos
Steven_L_Intel1
Employee
1,976 Views
Well, if you use the project wizard and ask for a sample application, it will give you one. Then just strip everything out but the function header and the return.

In other words, where you have:
program main
... stuff
end

replace it with:
integer(4) function WinMain (hInstance, hPrevInstance, lpszCmdLine, nCmdShow)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WinMain@16' :: WinMain
integer(4) hInstance
integer(4) hPrevInstance
integer(4) lpszCmdLine
integer(4) nCmdShow
... stuff
WinMain = 0
return
end function WinMain

I don't know of a way to hide the QuickWin window.

Steve
0 Kudos
david_jones
Beginner
1,976 Views
For QuickWin you can try SETWSIZEQQ to minimize the frame window. This may not be quite what you are looking for, as you might see an effect whereby the window is drawn and then minimised.

David Jones
0 Kudos
Intel_C_Intel
Employee
1,976 Views
I found this in CLOSE when I was looking for something else: "In QuickWin, use CLOSE with unit 0, 5, or 6 to close the default window.". But I can not see any effect for this CLOSE in QuickWin applications. What does "default window" mean here?

BTW, since 3-4 weeks it takes half an hour to get response from this site whenever I click on Reply or Log-in. And the response is often "Page can not be shown...", and sometimes something about the Fire-wall. I haven't similar problems with any other site. Am I alone having this problem? Are Intel's servers closed for log-ins when it is night down there? Because of MSBlast? It begins to respond normally when the day begins there!

Sabalan.
0 Kudos
tmcole
Beginner
1,976 Views
Steve, thanks - it works perfectly. I had tried the wizard that set up a regular windows dialog, but the code that was generated was so cryptic I never could get anything to work. It never made it to the section of code where I was supposed to insert my code. That's the problem with wizards - they gloss over everything so that if one thing goes wrong, you end up being left hanging in the wind.....

Regardless, you would think that there would (should) be an easy way to close the QuickWin window.
0 Kudos
tmcole
Beginner
1,976 Views
Sabalan, I've been having the same problem, so you're not alone.
0 Kudos
Steven_L_Intel1
Employee
1,976 Views
The problem with the forum login server seems to crop up periodically, and doesn't get fixed until the Intel folks in California wake up.

Steve
0 Kudos
durisinm
Novice
1,976 Views
I usually get quick response when going to www.intel.com. The server for this forum, though, seems to be very slow when it's working, and it's not uncommon for me to get some kind of error message about the page not being available.

Mike
0 Kudos
Steven_L_Intel1
Employee
1,976 Views
The forum itself is hosted by an outside company and is generally reliable However, login authorization is handled by a particular intel.com server that seems to go down frequently, which is what gives you the error. Curiously, it affects my access from inside Intel more frequently than outside accesses do - for example, this is the first time today I've been able to log in!

Steve
0 Kudos
Reply