Page 1 of 1

Calling wxwindows from Visual Fortran dll

Posted: Thu Sep 16, 2004 2:26 pm
by jesusfranco
Hi,

I want to develop a dll in Visual Fortran that it use wxWindows to show a basic window and write text on it (as a console). What would be the procedure?

Thanks

Posted: Thu Sep 16, 2004 2:30 pm
by cg
I have done this stuff with vc/vb->compaq fortran. You should consider using the dll from a wx app. Pass is an array of your data, and have it return out a resulting array. Or..... Have the dll write to a file and when the dll call returns have the wx app load the file to show your data.

HTH

CG

Calling wxwindows from Visual Fortran dll

Posted: Thu Sep 16, 2004 2:48 pm
by jesusfranco
Thank you cg for answering me.

I understand that it is not possible to do what I want.

My fortran dll does extensive calculations that use a lot of time and I would wish information to appear such and since they are calculated.

Consider using multi-threading

Posted: Fri Oct 08, 2004 9:58 am
by Guest
For what you want specifically, the best option would be to use multi-threading, you keep one GUI thread reading a global data structure, as the other threads perform the calculations and update it - either by using your Fortran dll or internally.

Posted: Mon Oct 11, 2004 10:44 pm
by geon
Could you use sockets to communicate between the 2 components?

It would make the wx part very simple to implement. (just make all socket events print the socket content in a textbox.)

Posted: Tue Oct 12, 2004 8:23 am
by Guest
Yes, sockets are also possible, but somewhat messier - if you use sockets you'll have implement your own "mutexes" yourself to protect the data, and worry about synchronizing the communications timing with the calculation process.

But your suggestion makes me think about the pros/cons of both methods for this specific kind of problem - when speed is crucial.