Normally for thread what you should be doing is pass the this parameter in the thread function and you can typecast the variable you get into the thread function back to dialog class object and then call the necessary function. Thread function prototype cannot change not the dialog class function's prototype.