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

Migrated Visual Studio dialog resource cannot be opened in VS2019 community edition

TonyRichards
Novice
912 Views

I have finally successfully migrated an application created in Microsoft Visual Studio 17 years ago and recreated and run it using the Intel Fortran Classic compiler in integrated with VS 2019 Community edition. Its main dialog window opens when the application is run in the debugger, and child windows appear properly in response to buttons etc.

NOTE ADDED AFTER POSTING:

 

I listed a problem opening the applications resource file using the default resource editor.

The problem is  now resolved -I was following the wrong guidance form an INtel help page!

 

Right-clicking on the resource file in Solution explorer gave me the correct option.

 

Sorry for posting in haste!

 

 

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
841 Views

The sources are part of the Xeffort package at xeffort.info .  (I host this site, but don't claim to maintain the software.)

View solution in original post

0 Kudos
7 Replies
andrew_4619
Honored Contributor II
901 Views

What was the crux of the original problem, conversion of the old VFproj file I would bet. Was making a new project the solution?

0 Kudos
TonyRichards
Novice
885 Views

It was a mixture.

Given the choice of templates that VS2019 gives you when you select  File...New...Project,  I guess I chose poorly and finished up with the framework of probably a C++ windows project which has its own expectation for the spelling/syntax of theexpected the WinMain entry that the program shouls generate, and no amount of !DECL STDCALL, ALIAS fudges I inserted would do, hence my programs entry point was never recognisable.

So I went back to basics, created my own copy of the SDI example Fortran/Windows/dessktop and tried that. It compiled and ran ok in the debugger. So I took the  WInMain directives from that (see below) and copied it back into my original program's WinMain file

integer*4 function WinMain( hInstance, hPrevInstance, lpszCmdLine, nCmdShow )
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WinMain@16' :: WinMain
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'WinMain' :: WinMain
!DEC$ ENDIF

before I made this chaange (actually, back to what it was originally), what is interesting, is that one failure to load was because _WinMain@16 could not be found! This was after seeing _WinMainCRTStartup and _WinMain not being found with earlier Compiler directives!

 

Any way, finally forgot all about converting DVF files etc, and went with Steve's suggestion of creating an empty project (in VS2019, File...New...project)  based on the Fortran/Windows/Desktop 'A project for creating an application witha windows user interface'. I then added all necessary source and resource files to it from the old working version.

 

And it compiled ok and I could run it in the debugger!

(I have omitted having to do some running repairs deleting use of Jugoslav DJugic's XFLOGM cludged version of DFLOGM and replacing it with the original DFLOGM references and commenting out all references in the dialog code which made use of some of his cludges which permit changingback ground colours of standard dialog controls and Ownerdraw controls -  which I use blank for drawing graphs in).

 

So I guess the answer, for me at least in future is, as Steve wisely suggested, create a blank template of the Fortran/windows/Desktop application, then fill it with proven debugged Fortran code  and necessary resource files, then cross your fingers when you select Run without Debugging!

 

Regards

 

P.S. Has anyone taken over updating Jugoslav's original XFLOGM.F90? It really was very useful for me. Besides enabling me to add Ownerdraw controls and background colours I think it eventually enabled context sensitive help being added to dialogs etc.

0 Kudos
Steve_Lionel
Honored Contributor III
893 Views

Also, please provide a pointer to the bad help page and explain what was wrong.

0 Kudos
TonyRichards
Novice
878 Views

I will try and retrace my steps, and dig it up.

 

0 Kudos
Steve_Lionel
Honored Contributor III
870 Views

Re: XFLOGM - This became Xeffort. No work has been done on it in years, though, and it is not 64-bit safe.

0 Kudos
TonyRichards
Novice
846 Views

Is there a Source file that I can download and try and compile to make the .MOD files equivalent to XFLOGM.MOD and XFLOGMT.MOD, equivalent to adding the old XFLOGM.F90 to my project?

0 Kudos
Steve_Lionel
Honored Contributor III
842 Views

The sources are part of the Xeffort package at xeffort.info .  (I host this site, but don't claim to maintain the software.)

0 Kudos
Reply