LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

activex events callback registration functions

I'm ebeding an ActiveX control into UIR file. I'm able to access it's methods and properties but having some problems creating callback functions for it's events. I see the events for the ActiveX control in the Event Callback Registration Function Window on the left. Is there a way to get CVI to create the callback functions as it does for a Command button or do you have to do it manually? If so how does one go about doing such?


regards,

Dan
0 Kudos
Message 1 of 6
(4,035 Views)

There is no way to do this automatically. You will need to do this programatically via the event callback registration functions that are generated with the ActiveX controller.

Bilal Durrani
NI
0 Kudos
Message 2 of 6
(4,018 Views)
Thanks Bilal:

Is there any sample code that illustrates the process of creating a callback handler using the callback registration functions? I'm kind of new to CVI and not familliar with how to use these functions properly.

Regards,

Dan
0 Kudos
Message 3 of 6
(4,014 Views)
The functions require a handle to the activex object, and a pointer to the function you want to fire when the particular event occurs. Each event registration function expects a particular function signature. If you open up the function panel and right-click on the callback function parameter, the help will indicate what the function signature should be. That is pretty much all you need to register a handler for the particular event. You will need to do thsi for each individual event you want to handle.


Bilal Durrani
NI
Message 4 of 6
(3,996 Views)
Bilal:

I got it to function.

Thanks
0 Kudos
Message 5 of 6
(3,960 Views)
Spoiler
 

I'm creating an activex controller for the first time.  I don't see the Callback Event Registration window.  How do I get to it?  I'm assuing this will tell me which callbacks I need to handle?

0 Kudos
Message 6 of 6
(3,379 Views)