Calling wxwindows from Visual Fortran dll

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jesusfranco
In need of some credit
In need of some credit
Posts: 4
Joined: Thu Sep 16, 2004 10:38 am

Calling wxwindows from Visual Fortran dll

Post by jesusfranco » Thu Sep 16, 2004 2:26 pm

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

cg
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 201
Joined: Sun Aug 29, 2004 12:33 am
Location: Canada
Contact:

Post by cg » Thu Sep 16, 2004 2:30 pm

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

jesusfranco
In need of some credit
In need of some credit
Posts: 4
Joined: Thu Sep 16, 2004 10:38 am

Calling wxwindows from Visual Fortran dll

Post by jesusfranco » Thu Sep 16, 2004 2:48 pm

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.

Guest

Consider using multi-threading

Post by Guest » Fri Oct 08, 2004 9:58 am

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.

geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon » Mon Oct 11, 2004 10:44 pm

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.)

Guest

Post by Guest » Tue Oct 12, 2004 8:23 am

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.

Post Reply