With the friend
declaration your function would have access to the members of a testWizard
object. However, you still need to provide an object or a pointer to such an object to access the variables:
testWizard* wizard = getTestWizard(); // no idea how to do that
if(event == CV_EVENT_LBUTTONDOWN && !wizard->drag) { ... }