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

Progress callback example

ferrad01
Beginner
391 Views
Do you have an example of how to implement a callback from Intel Fortran back into VC++ for the purpose of a progress bar or cancel button?
0 Kudos
1 Reply
Paul_Curtis
Valued Contributor I
391 Views
My implementation of typical Windows functionality involves what seems to be the reverse of your question (if I understand it correctly), wherein one registers a Fortran proc function with the opsys, so the Fortran proc will then be called from the opsys (not the other way around) in response to trigger events such as button pushes, and also can be used to update display elements such as progress bars by being sent a message from your calculational code. If this is what you're trying to do, the steps typically involve

1. Your app calls CreateWindow() to create a window, child, dialog, whatever
2. initialize a TYPE(T_WNDCLASS) object, wc, with the name of your proc:
wc%lpfnWndProc = LOC(yourprocname)
RegisterClass(wc)
3. yourprocname has the standard canonical format to receive the four Windows
messaging arguments, (hwnd, msg, wParam, lParam)
4. windows messages for your window will be routed to yourprocname, which
contains a CASE() structure to isolate the relevent messages and respond,
such as updating the extent of a progress-bar or dealing with a button push

Many detailed examples of this sort of code are available, if this is what you're looking for.
0 Kudos
Reply