The callback that you want is the panel callback for the panel that is having its "x" clicked.
Make sure that you specify a callback in the panel definition dialog box:
- Open the .uir file and double click the panel you want to configure
- In the second box down, enter a callback name, if one is not already specified.
- Click OK to close the dialog box.
- Save your .uir file.
Use the LabWindows CVI code generator to generate a callback for that panel:
- Left click once on the panel that you want to generate a callback for.
- Select Code->Set Target File from the menu, and select the file in which you want to place the callback function.
- Select Code->Generate->Panel Callback from the menu.
- Press Ctrl-P to view the n
ewly created callback function in the file you specified.
When the user clicks the "x", an EVENT_CLOSE is generated. Inside the callback function you'll see the case EVENT_CLOSE: section. This is where the program control will go when the "x" is clicked.
Hope this helps.