#include <utility.h>
#include <cvirte.h>
#include <userint.h>
#include "parent.h"
static int panelHandle;
static int child1;
static int child2;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "parent.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
int CVICALLBACK COMMANDBUTTON (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
LaunchExecutableEx ("C meter.ece", LE_SHOWMAXIMIZED, &child1);
RetireExecutableHandle (child1);
break;
}
return 0;
}
int CVICALLBACK COMMANDBUTTON_2 (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
LaunchExecutableEx ("P meter.ece", LE_SHOWMAXIMIZED, &child2);
RetireExecutableHandle (child2);
break;
}
return 0;
}
int CVICALLBACK CLOSE (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0);
break;
}
return 0;
}
麻烦你看下我的程序还需要添加什么语句吗
|