Announcement

Collapse
No announcement yet.

Handle Late-bound Events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handle Late-bound Events

    Hi,

    Ok this might be a bit of a tricky thing I want to accomplish. Here is the idea.

    I would like to dynamically instantiate ActiveX controls on a form. This can be
    done through the use of ATL and it seems to work pretty well. I can get the
    dispatch pointer and set the properties even with the scripting engine Enable Basic.

    Now, the next step would be to have the events fired from the ActiveX to run a script function. The question is how can one accomplish late binding of events.

    The Events From ... To... is compile-time related. I need to be able to intercept the click of a button (ActiveX control button that is) and handle that event be calling some user defined routine. This routine is only known at runtime (a script f.i.).

    Sor far I found this url:

    http://msdn.microsoft.com/en-us/magazine/cc301508.aspx

    But it's a bit above my head at the time. I think I should go to school again.

    Any other ideas are welcome

    Steven
    Last edited by Steven Pringels 3; 10 Apr 2009, 04:25 AM.
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

  • #2
    I guess my prayers have been answered here

    https://www.powerbasic.com/support/p...ad.php?t=23665

    thank you Torsten Rienow !!!
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

    Comment


    • #3
      It is not tricky, and you do not need a DLL to do it. Have a look at José's old code before the arrival of PB 9.0.
      Well, there is most likely one important piece missing from José's code, but it is a start.
      Maybe we can have some fun with low-level COM code if you are interested.
      Last edited by Dominic Mitchell; 10 Apr 2009, 08:21 AM.
      Dominic Mitchell
      Phoenix Visual Designer
      http://www.phnxthunder.com

      Comment

      Working...
      X