int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
parent_handle=LoadPanel(0,"panels.uir",PARENT); //装载父面板
child=LoadPanel(parent_handle,"panels.uir",CHILD); //装载子面板
DisplayPanel(parent_handle); //显示父面板
RunUserInterface(); // 运行用户界面
return 0;
}
int CVICALLBACK ShowHidePanels (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
if(event=EVENT_COMMIT)
{
switch(control)
{
case PARENT_SHOW:
DisplayPanel(child);
break;
case PARENT_HIDE:
HidePanel(child);
break;
}
}
return 0;
}
int CVICALLBACK Shutdown (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0);
break;
}
return 0;
}
#include <userint.h>
#include "panels.h"
static int parent_handle, child;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
parent_handle=LoadPanel(0,"panels.uir",PARENT); //装载父面板
child=LoadPanel(parent_handle,"panels.uir",CHILD); //装载子面板
DisplayPanel(parent_handle); //显示父面板
RunUserInterface(); // 运行用户界面
return 0;
}
int CVICALLBACK ShowHidePanels (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
if(event=EVENT_COMMIT)
{
switch(control)
{
case PARENT_SHOW:
DisplayPanel(child);
break;
case PARENT_HIDE:
HidePanel(child);
break;
}
}
return 0;
}
int CVICALLBACK Shutdown (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0);
break;
}
return 0;
}
谢谢大神
我用的是rigol 3068的数表。
一周热门 更多>