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

Using certain API functions in Quickwin

dboggs
New Contributor I
678 Views
I have found that the API function Movewindow works fine in a Quickwin program, and is in fact a more convenient way to move and size child windows than the "official" SETWSIZEQQ method. Ditto for SetwindowPos. All that's required is to include USE USER32.

There are other API functions I would like to use, namely Findwindow and Showwindow. But these don't work, producing a compiler error "#6284: There is no matching specific function for this generic function reference."

Am I missing something? How can I tell which API functions should work and which ones shouldn't?
0 Kudos
3 Replies
Paul_Curtis
Valued Contributor I
678 Views
IVF provides interfaces to almost all Windows API functions. You can check the specifics for any given function by searching the API name and specifying the compiler include path, which for my (32-bit) system installed using Intel defaults is the following:

C:\Program Files\Intel\ComposerXE-2011\compiler\include\ia32;C:\Program Files\Intel\ComposerXE-2011\compiler\include

It is extremely useful to be able to review the exact argument declarations in the supplied interface, as these sometimes differ from the way the C function arguments are described in the MSDN documentation.

For the function you mention, you might want to try FindWindowEx() instead.
0 Kudos
dboggs
New Contributor I
678 Views

I'm not sure what you mean by "specifying the compiler include path," but here is what I have:

$(IFortInstallDir)compiler\include

$(IFortInstallDir)compiler\include\ia32

$(IFortInstallDir)mkl\include

$(VCInstallDir)atlmfc\include

$(VCInstallDir)include

$(WindowsSdkDir)include

$(FrameworkSDKDir)include

The question is, how do I know what is needed? Microsoft documentation says I need User32.lib or User32.dll (the same thing as for function MoveWindow, which works OK for me). If I look on CVF documentation (the last one for which I have Intel's complete setup), it says I need the import library User32.lib.

To specify this .lib I would use the compiler library path, not the include path. I have user32.lib on my computer, and it is on my library path, but still doesn't work.

As far as findwindowex instead of findwindow, yes I'm aware of that. It gives the same compiler error as findwindow (and many others).

0 Kudos
dboggs
New Contributor I
678 Views
OK, I'm making some progress now. The trick is to look in the file USER32.F90 (found in the compiler INCLUDE directory) and find the interface section for FINDWINDOW (or whatever one is in question). In this case, you learn that the calling syntax is FINDWINDOW_G1.

I still don't have it working, but I'm off and running now!
0 Kudos
Reply