Passing DLL events to parent frame? 
Author Message
 Passing DLL events to parent frame?

I'm having the following problem: how can I pass events from a DLL to the
parent calling it since events cannot be declared with the EXTERNAL
attribute?
This is how it SHOULD work:

1) by clicking on a button on the parent frame toolbar an external DLL
procedure is called,
2) the button becomes disabled,
3) when the procedure terminates the button is re-enabled.

I know how to do that from within the same application using the main
thread & case events but how do u do that with DLLs?
Thanks for any help.

Jean-Marc



Sat, 10 Jun 2000 03:00:00 GMT  
 Passing DLL events to parent frame?

Jean-Marc,
    Sorry that I don't know enough about Events to be able to answer that
using Events, but you might consider using a global variable (it could be one
bit of a variable - so you could use it for other "enable/disable" stuff). If
the procedure you call (I am assuming it is threaded - otherwise it is a moot
point because it becomes single instance [I believe!]) is successfully
started (start returns the thread number if it was successful), then you
disable the button, set (or reset) your variable (or bit). Use your timer to
"test" the variable periodically. Have your called procedure change the state
of the variable back, and that should do it. Not quite as "clean" as posting
an event, but it would work.
    I believe there may be a way to post that event "externally", but again,
I don't have that much experience with Events...
    Hope that helps. Let us know what you end up doing.

    Regards,

    kurtt

Quote:

> I'm having the following problem: how can I pass events from a DLL to the
> parent calling it since events cannot be declared with the EXTERNAL
> attribute?
> This is how it SHOULD work:

> 1) by clicking on a button on the parent frame toolbar an external DLL
> procedure is called,
> 2) the button becomes disabled,
> 3) when the procedure terminates the button is re-enabled.

> I know how to do that from within the same application using the main
> thread & case events but how do u do that with DLLs?
> Thanks for any help.

> Jean-Marc




Sun, 11 Jun 2000 03:00:00 GMT  
 Passing DLL events to parent frame?

Quote:
>I'm having the following problem: how can I pass events from a DLL to the
>parent calling it since events cannot be declared with the EXTERNAL
>attribute?

Jean-Marc,

Check the docs on POST and remember that the Frame of an Application
is always THREAD #1.

HTH,

Douglas



Tue, 13 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing DLL events to parent frame

2. Error: No Parent Frame for DLL Child MDI window

3. Pass X events to parent

4. Open dialog passes events through to parent

5. Passing Javascript/VRML events between frames

6. event bindings which pass the event himself first..?

7. Are Frames a true subset (parent) of Canvas?

8. Method to pass data from a child to a parent process

9. How to pass the result (array) of the spawnned processes to parent when it complets

10. events from child -> parent

11. event trapping in frame

12. Frame extentions with timer events

 

 
Powered by phpBB® Forum Software