08-14-2006 06:35 PM
08-14-2006 09:09 PM
int CVICALLBACK PanelCB (int panel, int event, void *callbackData, int eventData1, int eventData2)
{
char** files = NULL, **ppc = NULL;
char* firstFile;
int length;
switch (event)
{
//This event occurs when files are dragged and dropped on the panel
case EVENT_FILESDROPPED:
files = (char**)eventData1;
if (files)
{
// Get first file pathname
firstFile = files[0];
// Get length of pathname
length = strlen (firstFile);
ppc = files;
while (*ppc)
{
printf ("Selected File : %s\n", *ppc);
free (*ppc);
*ppc = NULL;
ppc++;
}
free (files);
files = NULL;
}
break;
}
return 0;
}