#include <cvirte.h>
#include <userint.h>
#include "CVIHelloWord.h"
static int panelHandle;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "CVIHelloWord.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
int CVICALLBACK panelCB (int panel, int event, void *callbackData,int eventData1, int eventData2)
{
switch (event)
{
case EVENT_GOT_FOCUS:
break;
case EVENT_LOST_FOCUS:
break;
case EVENT_CLOSE:
break;
}
return 0;
}
int CVICALLBACK strHello (int panel, int control, int event,void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
break;
}
return 0;
}
int CVICALLBACK btnHello (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
//把string控件内容设置为“Hello CVI 2019”
SetCtrlVal (panelHandle, PANEL_STRING, "Hello CVI 2019");
//弹出提示框
MessagePopup("CVI 2019", "Hello World!");
break;
}
return 0;
}
int CVICALLBACK btnExit (int panel, int control, int event,void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
//退出程序
QuitUserInterface (0);
break;
}
return 0;
}
|
确实是一个很好的软件。国内会越来越多的人使用
这款软件上手容易,只要你有点C基础就行。