LabWindow好用还是LabView好用?
LabView的资料最齐全。最容易学,但是界面没有LabWindow 好看。
大家论论
本人开始入手学习啦,学LabWindow 的朋友,照顾一下新手哦
。
贴程序啦~!~!
主面板中调用副程序,待有所提高,我再贴更好的~!~
#include
#include
#include "UserInterface.h"
static int panelHandle, childpanel;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "UserInterface.uir", PANEL)) < 0)
return -1;
if ((childpanel = LoadPanel (0, "UserInterface.uir", ChildPanel)) < 0)
return -1;
/////////////////////////////////////////////////
/////////////////////////////////////////////////
//////////////////////////////////////////////////
/////////////////////////////////////////////////
DisplayPanel (panelHandle);//运行用户界面
//DisplayPanel (childpanel); //运行副面板
RunUserInterface ();
DiscardPanel (panelHandle); //删除主面板
DiscardPanel (childpanel);
return 0;
}
int CVICALLBACK C_ShowPanel (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
DisplayPanel(childpanel); //显示副面板
break;
}
return 0;
}
int CVICALLBACK C_QuitSystem (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
QuitUserInterface (0); //推出出用户界面
break;
}
return 0;
}
int CVICALLBACK C_Quit (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
HidePanel(childpanel); //隐藏副面板
break;
}
return 0;
}