As Luis said, you can use the InstallCtrlCallback to install an existing function as a callback for the selected control. The function installed as a callback should have the same prototype as callbacks generated by CVI. It should also return 0 unless you want to swallow the event.
If panelHandle is the handle to a panel with the constant name PANEL which has a control with the constant name CONTROL, and you want the callback to be MyCallback and you don't want to pass any callback data,
installErr = InstallCtrlCallback (panelHandle, PANEL_CONTROL, MyCallback, 0);
//....
int CVICALLBACK MyCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
case EVENT_COMMIT:
// your code goes here
break;
}
return 0;
}