Something like that should do the trick (tested with an InstallPopup'ed panelB :
It's not really something I'm proud of...
int CVICALLBACK QuitBCallback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int Status;
int panelGUE;
int ctrlGUE;
int ActivePanel;
switch (event)
{
case EVENT_COMMIT:
DebugPrintf("QuitBCallback COMMIT\n");
Delay(0.100);
do
{
Status = GetUserEvent(0, &panelGUE, &ctrlGUE);
}
while (Status != 0);
ActivePanel = GetActivePanel ();
if (ActivePanel == panelB)
{
RemovePopup(panelB);
}
break;
}
return 0;
}
Best regards,
Nicolas