call a given callback function from an control extension (dll)
Posted: Wed May 04, 2016 7:45 pm
Is there a way that a own control extension can call a callback function?
One example usescase would be that your control extension has a function that starts a calculation that might take a while an in your code you do not require the result immediately but you like to get a notification with the result.
e.g:
If it is possible, are there any examples available how to implement this?
One example usescase would be that your control extension has a function that starts a calculation that might take a while an in your code you do not require the result immediately but you like to get a notification with the result.
e.g:
Code: Select all
//button clicked event
{
.....
registerResultCallBack("resultCB"); //function in your control extension to register the callback function that should be called
startCalculation(); //function in your control extension that starts the calculation
.....
}
resultCB(int value) //function that is called from your control extension as soon as the calculation has finished
{
txt1.text = value;
}