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

Quick Win Dialog

heth
Beginner
535 Views
I can start the Dialog correctly from the Menue: Edit -> load processdata.
In 'Init_Windo.f' stands, the then the Routine 'Dialog_process' is called.
But when I call then Routine 'Dialog_process' direct from main.f, the dialog
comes up, but I cannot change a Value - the diaolg is dead.
Can you help me ?
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
535 Views
You cannot run a modeless dialog from QuickWin's PROGRAM (or any routine it calls). You can do that from a menu callback though.

Depending on what you want to achieve (it isn't clear from the code), you can:

1) Run it as a modal dialog (but you cannot do a calculation simultaneously in that case)

2) Run it from a callback. You can sync the callback and calculation (in PROGRAM or its descendant routine e.g. using a global logical variable):


program x

logical bCalcStart
common bCalcStart
...
bCalcStart = .false.
...
do while (.true.)
if (bCalcStart) then
do i=1,100000000
...
end do
bCalcStart = .false.
else
call sleepqq(0)
end if
end do

end program x


Somewhere in the menu/dialog callback, set up the bCalcStart to .true. -- the calculation will start running in the secondary thread.

3) You can use similar technique as in 2), but you can run the dialog (more precisely, invoke the menu callback) automatically using subclassing technique as shown in QWToolbar sample.

Jugoslav
0 Kudos
Intel_C_Intel
Employee
535 Views
Does anyone have any suggestions as to a good book to learn how to port some old Fortran progams into Windows using Intel Fortran?
Is Lawrence's book good for this?
0 Kudos
Steven_L_Intel1
Employee
535 Views
Yes, the Lawrence book is fine. The Visual Studio interface is a bit different but the programming techniques are identical.
0 Kudos
Reply