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

DialogBoxs function?

ron1
Beginner
677 Views

Hey Guys,

I'm upgrading some old CVF code, and in it I use the DialogBox function. I swapped out my use for "use ifwin". For normal 32-bit, everything compiles and links fine.

For 64-bit on the other hand, I get an unresolved external symbol DialogBoxs link error. I don't know where thes at the end of the function name came from, but my annoyedglance would probably be directed towardsone of the use wrappers.

Doing a dumpbinon the object does confirm that for the 64-bit, it has a DialogBoxs symbol.

If anyone's seen this or has any clues to what I might be doing wrong, a little help would be greatly appreciated. Thanks in advance.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
677 Views
Well, this is an odd one. For MSVC, DialogBox is a macro - it does not map to an actual routine in user32.dll. CVF (and IVF for IA-32) implements DialogBox as a function declared in module IFWBASE (DFWBASE) which calls the routine with the "s" name in library ifwin.lib.

For reasons I don't understand, this routine is absent for x64. I'm guessing that this is one of a set of routines that were initially defined for 16-bit Windows, supported for 32-bit but not for 64-bit. But I don't see anything obviously saying so in MSDN (unlike some of the other functions in IFWBASE.) Looking at the definitions now, it seems that you should use DialogBoxParam instead. Add a NULL as the last argument unless you want to use that.

I think it's a bug that we don't provide DialogBoxs on x64 and I'll report that to the developers.
0 Kudos
ron1
Beginner
677 Views

Awesome, I just needed to know if a code change was needed or not. There's more than enough ways to create a window.

Thanks for the quick and knowledgeable response, Doctor. You make Fortran programming for a C++ guy bearable :)

0 Kudos
Steven_L_Intel1
Employee
677 Views
CreateWindow and CreateDialog are in the same boat. Replace with CreateWindowEx and CreateDialogParam.
0 Kudos
Reply