- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a modal dialog application that works like a calculator. It was developed on a system running Windows 2000 with CVF 6.1A, as a WIN32 program. The application works fine, but when it is run it appears to want to be open in a context with the DOS screen as a background. I would like to be able to minimize or close this background screen, but the only way I have found to do it is with the Windows PIF editor and I suspect that this is not very portable. Does anyone have any suggestions?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's because you created a "Fortran Console Application". From your description, you don't need a console at all. So, instead, you need a "Fortran Windows Application" -- this one creates only windows that you tell it to.
Best, create a new workspace of type Fortran Windows Application. Select "Empty windows application" in the wizard; insert your old .for/.f90 file and just replace PROGRAM...END PROGRAM statements with
Jugoslav
Best, create a new workspace of type Fortran Windows Application. Select "Empty windows application" in the wizard; insert your old .for/.f90 file and just replace PROGRAM...END PROGRAM statements with
INTEGER FUNCTION WinMain(hI, hPI, lpszCL, nShow) !DEC$ATTRIBUTES STDCALL, ALIAS: "_WinMain@16":: WinMain INTEGER:: hI, hPI, lpszCL, nShow ... END FUNCTION WinMain
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much. The program works now as I had hoped it would, although the linker prints a warning that the return value for the WinMain function has not been defined. Can I just ignore this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - add:
WinMain = 0
Before the RETURN or END.
Steve
WinMain = 0
Before the RETURN or END.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added the statement, and now get no warning. Thanks a lot.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page