当前位置: 首页>>代码示例>>C++>>正文


C++ SetCtrlAttribute函数代码示例

本文整理汇总了C++中SetCtrlAttribute函数的典型用法代码示例。如果您正苦于以下问题:C++ SetCtrlAttribute函数的具体用法?C++ SetCtrlAttribute怎么用?C++ SetCtrlAttribute使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetCtrlAttribute函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ManipulateGraphCallback

int  ManipulateGraphCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
    int handle, index;
    channelPtr chan;
    double x, y, above, below;

    if (event == EVENT_VAL_CHANGED)
    {
        chan = callbackData;
        GetGraphCursor (chanview.p1, CHANVIEW_GRAPH, 1, &x, &y);
        SetCtrlVal (chanview.p2, MANIP_INDEX, (int)x);
        SetCtrlVal (chanview.p2, MANIP_READING, y);
    }

    if (event == EVENT_COMMIT)
    {
        chan = callbackData;
        GetGraphCursorIndex (chanview.p1, CHANVIEW_GRAPH, 1, &handle, &index);
        GetGraphCursor (chanview.p1, CHANVIEW_GRAPH, 1, &x, &y);
        SetCtrlVal (chanview.p2, MANIP_INDEX, index);
        SetCtrlVal (chanview.p2, MANIP_READING, y);
        if (x == 0) below = 0.0;
        else below = chan->readings[(int)x-1];
        if (x == (chan->pts-1)) above = 0.0;
        else above = chan->readings[(int)x+1];
        if (fabs(above - chan->readings[(int)x]) < fabs(below - chan->readings[(int)x]))
            SetCtrlAttribute (chanview.p2, MANIP_READING, ATTR_INCR_VALUE,
            fabs(above - chan->readings[(int)x])/2);
        else
            SetCtrlAttribute (chanview.p2, MANIP_READING, ATTR_INCR_VALUE,
            fabs(below - chan->readings[(int)x])/2);
    }

    return 0;
}
开发者ID:gaorlov,项目名称:DAAS,代码行数:35,代码来源:chanfnc.c

示例2: disconnectScanController

/// HIFN disconnect from the ScanController and clear the ClientControl arrays
void disconnectScanController(void)
{
    // disconnect the Scan Controller
    ScanController_Client_Disconnect();

    // clear the Client Control arrays, and re-enable the controls
    for (int n = 0; n < gNumClientControls; n++)
    {
        // re-enable the control
        SetCtrlAttribute(gClientControl_Panel[n], gClientControl_Control[n], ATTR_DIMMED, 0);

        // free the variable value memory
        free(gClientControl_Values[n]);
    }
    free(gClientControl_Panel);
    free(gClientControl_Control);
    free(gClientControl_Values);
    free(gClientControl_DataType);
    free(gClientControl_Updated);
    free(gClientControl_RequiresPatternCalculation);
    gClientControl_Panel 	= NULL;
    gClientControl_Control 	= NULL;
    gClientControl_Values 	= NULL;
    gClientControl_DataType = NULL;
    gClientControl_Updated 	= NULL;
    gClientControl_RequiresPatternCalculation = NULL;
    gNumClientControls = 0;

    // update the indicator variable for the Client Mode
    gClientMode = 0;

    // update the label on the Client Mode button
    SetCtrlAttribute(TabPage_0, TABPANEL_ClientMode, ATTR_LABEL_TEXT, "__Start Client Mode");
}
开发者ID:magchipslab,项目名称:SLM-software,代码行数:35,代码来源:SLM+Control+Panel+Client+Mode.c

示例3: popupPanelForGraph

/* 配置并弹出信号分析面板 */
void popupPanelForGraph(int pHdl){
	int i = getGraphIndex(pHdl, 0); //Need a index to find one of the six graphs.
	char title[50];
	for(int j=0; j<(READ_LENGTH/24); j++)
		tempData[i][j] = resultData[i][j];
	Delay(0.1);
	for(int z=(READ_LENGTH/24),x = 0; z<(READ_LENGTH/12); z++,x++)
		tempData[i][z] = resultData[i][x];
	// 从uir文件中加载 信号分析面板
	if(PopPanels[i] <=0 ){
		if ((PopPanels[i] = LoadPanel(0, "MainPanel.uir", PopupPanel)) < 0)
			showError("Load PopupPanel Error!");
		DisplayPanel(PopPanels[i]);
		PopGraphs[i] = PopupPanel_PopGraph1;
		GetPanelAttribute(pHdl, ATTR_TITLE, title);
		SetPanelAttribute(PopPanels[i], ATTR_TITLE, title);
		SetCtrlAttribute(PopPanels[i], PopGraphs[i], ATTR_GRID_COLOR, plotGridColor);
		SetCtrlAttribute(PopPanels[i], PopGraphs[i], ATTR_GRAPH_BGCOLOR, VAL_TRANSPARENT);
		//temp SetAxisScalingMode(PopPanels[i], PopGraphs[i], VAL_LEFT_YAXIS, VAL_MANUAL, yAxisRange[0], yAxisRange[1]);
		PopGPlots[i] = PlotY(PopPanels[i], PopGraphs[i], tempData[i], READ_LENGTH/12, 
							 VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID,1, plotLineColor);
	}else{
		SetActivePanel(PopPanels[i]);
	}
	
}
开发者ID:HelloLyfing,项目名称:Signal_Monitor_System_Based_On_LabWindows-CVI,代码行数:27,代码来源:MainCode.c

示例4: pause

int CVICALLBACK pause (int panel, int control, int event,
					   void *callbackData, int eventData1, int eventData2)
{
	switch (event)
	{
		case EVENT_COMMIT:
			if (pause_flag)
			{
				pause_flag=0;
				SetCtrlAttribute (ERG_panel, ERG_panel_pause, ATTR_CMD_BUTTON_COLOR, VAL_RED);
				SetCtrlAttribute (ERG_panel, ERG_panel_pause, ATTR_LABEL_TEXT, "Pause");
				SRS_flag=2;
				SRS_onoff();
			}
			else
			{
				pause_flag=1;
				SetCtrlAttribute (ERG_panel, ERG_panel_pause, ATTR_CMD_BUTTON_COLOR, VAL_GREEN);
				SetCtrlAttribute (ERG_panel, ERG_panel_pause, ATTR_LABEL_TEXT, "Resume");
				SRS_flag=0;
				SRS_onoff();
			}
			break;
	}
	return 0;
}
开发者ID:cedschmidt,项目名称:QC-Vision,代码行数:26,代码来源:gpibrw.c

示例5: ConfigCMD

int CVICALLBACK ConfigCMD (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	switch (event)
	{
		case EVENT_COMMIT:
			 DimAction(1);
			  WriteLog();
			  ResetTextBox (panelHandle, PANEL_TEXTBOX, "");
		
			if (ReadConfigFile(BBUCOMMON_CONFIGCMD))
			{
				if (0==InstallPopup(configHandle))
				{
					SetPanelAttribute (configHandle, ATTR_TITLE, "CheckCMD");    
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_ENTER_IS_NEWLINE, 1);
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_TEXT_BGCOLOR, VAL_OFFWHITE);
				}
			}
			else
			{
				SetCtrlVal (panelHandle, PANEL_TEXTBOX, "Read data from cmd.txt error,please check it by manual!\r\n");
			}
					
		
			  DimAction(0);   
			break;
	}
	return 0;
}
开发者ID:jufei,项目名称:BtsShell,代码行数:30,代码来源:Remotely.c

示例6: DimAction

void DimAction(int flag)
{
	SetCtrlAttribute (panelHandle, PANEL_OUTPUT, ATTR_DIMMED, flag);
	SetCtrlAttribute (panelHandle, PANEL_TAB, ATTR_DIMMED, flag); 
	/*
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_DOWNLOAD, ATTR_DIMMED, flag); 
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_UPLOAD, ATTR_DIMMED, flag);
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_CONFIGCMD, ATTR_DIMMED, flag);
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_SENDCMD, ATTR_DIMMED, flag);
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_ENABLEPORT, ATTR_DIMMED, flag);
	SetCtrlAttribute (bbucommonHandle, BBUCOMMON_UPDATEALLPUT, ATTR_DIMMED, flag);
	
	SetCtrlAttribute (rrucommonHandle, RRUCOMMON_ENABLEOPT, ATTR_DIMMED, flag);
	SetCtrlAttribute (rrucommonHandle, RRUCOMMON_ENABLEVSWR, ATTR_DIMMED, flag);
	SetCtrlAttribute (rrucommonHandle, RRUCOMMON_GETRRULOG, ATTR_DIMMED, flag);
	
	
	SetCtrlAttribute (customizingHandle, CUSTOM_UPDATENAME, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_UPDATEVENDOR, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_CHECKSFP, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_SEARCHFILE, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_RECORDUPTIME, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_CHECKUPTIME, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_FETCHLOGS, ATTR_DIMMED, flag);
	SetCtrlAttribute (customizingHandle, CUSTOM_ANALYZEFILTER, ATTR_DIMMED, flag);  */
	
	
	SetMenuBarAttribute (menubarHandle, MENUBAR_CONFIG, ATTR_DIMMED, flag);
	SetMenuBarAttribute (menubarHandle, MENUBAR_HELP, ATTR_DIMMED, flag);
	
}
开发者ID:jufei,项目名称:BtsShell,代码行数:31,代码来源:Remotely.c

示例7: Save

int CVICALLBACK Save (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	char *value = "";
	switch (event)
	{
		case EVENT_COMMIT:
			 value = (char*)malloc(50);
			 memset(value,0,50);
			 GetPanelAttribute (configHandle, ATTR_TITLE, value);
			 if (strcmp("CheckBBUIP", value)==0)
			 {
				 if(1==WriteConfig(MENUBAR_CONFIG_CONFIGIP))
			 	{
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_TEXT_BGCOLOR, VAL_OFFWHITE);
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_CTRL_MODE, VAL_INDICATOR);
			 		SetCtrlVal (panelHandle, PANEL_TEXTBOX,  "Save bbuip.txt successfully!\r\n");  
			 	}
			 
			 }
			 if (strcmp("CheckCMD", value)==0)       
			 {
				 if(1==WriteConfig(BBUCOMMON_CONFIGCMD))
			 	{
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_TEXT_BGCOLOR, VAL_OFFWHITE);
					SetCtrlAttribute (configHandle, CONFIG_BOX, ATTR_CTRL_MODE, VAL_INDICATOR);
			 		SetCtrlVal (panelHandle, PANEL_TEXTBOX,  "Save command.txt successfully!\r\n");  
			 	}
			 }
			 free(value);
			 
			break;
	}
	return 0;
}
开发者ID:jufei,项目名称:BtsShell,代码行数:35,代码来源:Remotely.c

示例8: das1602Operate

void das1602Operate (int menubar, int menuItem, void *callbackData, int panel)
{
    MCCdevPtr dev = callbackData;
    das1602Ptr das = dev->device;
    acqchanPtr acqchan;
    int i, x = 0, m;
    if(!das->panel)
    {
        das->panel = LoadPanel(utilG.p, "DAS-1602u.uir", DAS_CTRL);
        das->menu = LoadMenuBar(das->panel, "DAS-1602u.uir", DASMENU);
        SetPanelMenuBar(das->panel, das->menu);
        for(i = 0; i < 8; i ++)
        {
            SetMenuBarAttribute (das->menu, das->Achannels[i]->menuitem_id, ATTR_CALLBACK_DATA, das->Achannels[i]);
            SetMenuBarAttribute (das->menu, das->Achannels[i]->menuitem_id, ATTR_ITEM_NAME, das->Achannels[i]->port.analogueIOport.IO.acqchan->channel->label);
            SetMenuBarAttribute (das->menu, das->Achannels[i]->menuitem_id, ATTR_CHECKED, das->Achannels[i]->port.analogueIOport.IO.acqchan->acquire);
        }
        SetMenuBarAttribute (das->menu, DASMENU_SOURCE_DAC1, ATTR_CALLBACK_DATA, das->Achannels[8]->port.analogueIOport.IO.source);
        SetMenuBarAttribute (das->menu, DASMENU_SOURCE_DAC2, ATTR_CALLBACK_DATA, das->Achannels[9]->port.analogueIOport.IO.source);
        SetMenuBarAttribute (das->menu, DASMENU_SOURCE_DAC1, ATTR_ITEM_NAME, das->Achannels[8]->port.analogueIOport.IO.source->acqchan->channel->label);
        SetMenuBarAttribute (das->menu, DASMENU_SOURCE_DAC2, ATTR_ITEM_NAME, das->Achannels[9]->port.analogueIOport.IO.source->acqchan->channel->label);
        SetCtrlAttribute (das->panel, DAS_CTRL_RANGE, ATTR_DIMMED, 1);
        SetCtrlAttribute (das->panel, DAS_CTRL_ACQ, ATTR_DIMMED, 1);
        
        SetCtrlAttribute (das->panel, DAS_CTRL_INPUT, ATTR_CALLBACK_DATA, das->Achannels[0]);
        SetPanelAttribute (das->panel, ATTR_CALLBACK_DATA, das);
    }
    SetMenuBarAttribute(menubar, menuItem, ATTR_DIMMED, 1);
    devPanel_Add (das->panel, dev, das1602_UpdateReadings);
    DisplayPanel(das->panel);
}
开发者ID:homer362s,项目名称:DAAS_SOFT,代码行数:31,代码来源:DAS-1602.c

示例9: utilG_Init

void utilG_Init (void (*DiscardPanels)(void))
{
    int p, control, top, height, width;
	int grw, chw, asw, acw;
    

    utilG.acq.pt = 0;
    utilG.acq.nPts = 0;
    utilG.acq.status = ACQ_NONE;

    utilG.p = LoadPanel (0, "utilu.uir", BG);
    
    utilG.DiscardPanels = DiscardPanels;

	SetPanelAttribute (utilG.p, ATTR_WINDOW_ZOOM, VAL_MAXIMIZE);
    DisplayPanel (utilG.p);
	
	GetCtrlAttribute(utilG.p, BG_GRAPHS, ATTR_WIDTH, &grw);
	GetCtrlAttribute(utilG.p, BG_CHANNELS, ATTR_WIDTH, &chw);
	GetCtrlAttribute(utilG.p, BG_ACQSETUP, ATTR_WIDTH, &asw);
	GetCtrlAttribute(utilG.p, BG_ACQCHANNELS, ATTR_WIDTH, &acw);
	GetPanelAttribute(utilG.p, ATTR_WIDTH, &width);
	
	SetCtrlAttribute(utilG.p, BG_GRAPHS, ATTR_LEFT,			(3*width/20) - grw);
	SetCtrlAttribute(utilG.p, BG_CHANNELS, ATTR_LEFT, 		(7*width/20) - chw);
	SetCtrlAttribute(utilG.p, BG_ACQSETUP, ATTR_LEFT, 		(9*width/15) - asw);
	SetCtrlAttribute(utilG.p, BG_ACQCHANNELS, ATTR_LEFT, 	(9*width/10) - acw);
	
	initP = LoadPanel (utilG.p, "utilu.uir", INIT);
    
    SetPanelPos (initP, VAL_AUTO_CENTER, VAL_AUTO_CENTER);

    SetCtrlAttribute (initP, INIT_TEXT, ATTR_VISIBLE, FALSE);
    DisplayPanel (initP);

    GetUserEvent (1, &p, &control);
    switch (control) {
        case INIT_CONTROL: utilG.acq.status = ACQ_DONE; break;
        case INIT_ANALYSIS: utilG.acq.status = ACQ_NONE; break;
        case INIT_EXIT:
            utilG_Exit();
            QuitUserInterface(0);
            exit (EXIT_SUCCESS);
            break;
    }
    SetMouseCursor (VAL_HOUR_GLASS_CURSOR);

    SetCtrlAttribute (initP, INIT_TEXT, ATTR_VISIBLE, TRUE);
    SetCtrlAttribute (initP, INIT_TEXT_10, ATTR_VISIBLE, FALSE);
    SetCtrlAttribute (initP, INIT_CONTROL, ATTR_VISIBLE, FALSE);
    SetCtrlAttribute (initP, INIT_ANALYSIS, ATTR_VISIBLE, FALSE);
    SetCtrlAttribute (initP, INIT_EXIT, ATTR_VISIBLE, FALSE);

    GetCtrlAttribute (initP, INIT_TEXT, ATTR_TOP, &top);
    GetCtrlAttribute (initP, INIT_TEXT, ATTR_HEIGHT, &height);
    SetPanelAttribute (initP, ATTR_HEIGHT, top+height+6);
    util_ChangeInitMessage ("DAAS Utilities...");
}
开发者ID:gaorlov,项目名称:DAAS,代码行数:58,代码来源:util.c

示例10: das1602_ControlCallback

int das1602_ControlCallback (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
    portPtr port = callbackData;
    switch (control)
    {
        case DAS_CTRL_RANGE:
            if(event == EVENT_COMMIT && port)
                GetCtrlVal(panel, control, &port->port.analogueIOport.range);
            break;
        case DAS_CTRL_INPUT:
            if(event == EVENT_COMMIT && port)
            {
                int i;
                MCCdevPtr dev = port->port.analogueIOport.IO.acqchan->dev;
                das1602Ptr das = dev->device;
                GetCtrlVal(panel, control, &i);
                port->control = 0;
                if(i != -1)
                {
                    das->Achannels[i]->control = control;
                    SetCtrlAttribute (panel, control, ATTR_CALLBACK_DATA, das->Achannels[i]);
                    SetCtrlAttribute (panel, DAS_CTRL_RANGE, ATTR_CALLBACK_DATA, das->Achannels[i]);
                    SetCtrlAttribute (panel, DAS_CTRL_ACQ, ATTR_CALLBACK_DATA, das->Achannels[i]);
                    SetCtrlIndex (panel, DAS_CTRL_RANGE, das1602_IndexFromRange(das->Achannels[i]->port.analogueIOport.range));
                    SetCtrlVal (panel, DAS_CTRL_ACQ, das->Achannels[i]->port.analogueIOport.IO.acqchan->acquire);
                }
                SetCtrlAttribute (panel, DAS_CTRL_RANGE, ATTR_DIMMED, (i == -1));
                SetCtrlAttribute (panel, DAS_CTRL_ACQ, ATTR_DIMMED, (i == -1));
                if(i == -1)SetCtrlVal (panel, DAS_CTRL_ACQ, 0);
            }
            break;
        case DAS_CTRL_ACQ:
        if(event == EVENT_COMMIT && port && utilG.acq.status != ACQ_BUSY)
        {
            int i;
            MCCdevPtr dev = port->port.analogueIOport.IO.acqchan->dev;
            das1602Ptr das = dev->device;
            GetCtrlIndex (panel, DAS_CTRL_INPUT, &i);
            if(i)
            {
                GetCtrlVal (panel, control, &port->port.analogueIOport.IO.acqchan->acquire);
                    if (port->port.analogueIOport.IO.acqchan->acquire)
                    acqchanlist_AddChannel(port->port.analogueIOport.IO.acqchan);
                else
                    acqchanlist_RemoveChannel(port->port.analogueIOport.IO.acqchan);
                SetMenuBarAttribute (das->menu, port->menuitem_id, ATTR_CHECKED, port->port.analogueIOport.IO.acqchan->acquire);
            }
        else if(event == EVENT_COMMIT && utilG.acq.status == ACQ_BUSY)
            SetCtrlVal (panel, control, port->port.analogueIOport.IO.acqchan->acquire);
            
        }
        break;
    }
    if(event == EVENT_COMMIT && port)
        das1602_UpdateMeasurePanel (port);
    return 0;
}
开发者ID:homer362s,项目名称:DAAS_SOFT,代码行数:57,代码来源:DAS-1602.c

示例11: k2400_UpdateReadings

static void k2400_UpdateReadings (int panel, void *dev)
{
    gpibioPtr my_dev = dev;
    k2400Ptr smu = my_dev->device;
	acqchanPtr acqchan = smu->source->acqchan;
    short statusbyte;
    char rsp[256];
    int control, dim, bg, mode, m;

	if (smu->operate) {
        if (utilG.acq.status == ACQ_BUSY)
			Delay(.05);
		if (!util_TakingData() || !(smu->source->acqchan->acquire || smu->measure->acquire)) {
            gpibio_GetStatusByte (dev, &statusbyte);
            if (statusbyte & K2400_SRE_READINGDONE) 
			{
				//k2400_In (dev, rsp);
                //Scan (rsp, "%s>%f,%f", &smu->source->acqchan->reading,
                //      &smu->measure->reading); 
            }
            //if (statusbyte & K2400_SRE_READYFORTRIGGER) 
				//k2400_Out (dev, "H0X", .02);
        }
		
		time(&present);
		if(difftime(present, past) >= delay)
		{
			k2400_GetReadings(acqchan);
			time(&past);
		}
        //if (expG.acqstatus != utilG.acq.status) 
		{
            m = GetPanelMenuBar (panel);
            dim = (util_TakingData() && smu->source->inlist &&
                   (utilG.exp == EXP_SOURCE));

            if (dim) { mode = VAL_INDICATOR; bg = VAL_PANEL_GRAY;}
                else { mode = VAL_HOT; bg = VAL_WHITE;}

            SetCtrlAttribute (panel, K2400_SOURCE, ATTR_CTRL_MODE, mode);
            SetCtrlAttribute (panel, K2400_SOURCE, ATTR_TEXT_BGCOLOR, bg);

            SetInputMode (panel, K2400_OPERATE, !dim);
            SetInputMode (panel, K2400_SELECT, !dim);
            SetInputMode (panel, K2400_SENSE, !dim);
            SetMenuBarAttribute (m, K2400MENUS_FILE_LOAD, ATTR_DIMMED, dim);
        }

        k2400_CheckforProblems (my_dev);
         SetCtrlVal (panel, K2400_OVERLIMIT, smu->overLimit);

        control = GetActiveCtrl (panel);
        if (util_TakingData() || (control != K2400_SOURCE))
            SetCtrlVal (panel, K2400_SOURCE, smu->source->acqchan->reading);
        SetCtrlVal (panel, K2400_MEASURE, smu->measure->reading);
    }
}
开发者ID:homer362s,项目名称:DAAS_2015,代码行数:57,代码来源:K2400.c

示例12: UpdateBarTitle

void UpdateBarTitle ( int hProgressHandle , int iBarNumber , char* szBarTitle )
{
	if ( hProgressHandle < 1 )
		return;
	
	if ( szBarTitle == NULL )
		return;
	
	switch (iBarNumber)
	{
		case 1: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_1 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 2: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_2 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 3: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_3 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 4: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_4 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 5: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_5 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 6: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_6 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 7: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_7 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 8: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_8 , ATTR_LABEL_TEXT , szBarTitle ); break;
		case 9: SetCtrlAttribute ( hProgressHandle , PROGRESS_BAR_9 , ATTR_LABEL_TEXT , szBarTitle ); break;
		
		default: break;
	}
	
	ProcessDrawEvents();
}
开发者ID:ialexyi,项目名称:Test-Executive,代码行数:25,代码来源:DB_WaitProgress.c

示例13: usb1208ls_MenuCallback

void usb1208ls_MenuCallback(int menubar, int menuItem, void *callbackData, int panel)
{
    switch (menuItem)
    {
        case USBMENU_MEAS_IN_0:
        case USBMENU_MEAS_IN_1:
        case USBMENU_MEAS_IN_2:
        case USBMENU_MEAS_IN_3:
        
            if(utilG.acq.status != ACQ_BUSY){
                portPtr port = callbackData;
                MCCdevPtr dev = port->port.analogueIOport.IO.acqchan->dev;
                usb1208lsPtr pmd = dev->device;
                port->measPanel = port->measPanel? port->measPanel : LoadPanel(utilG.p, "USB-1208LSu.uir", MEASURE);
                SetCtrlAttribute (port->measPanel, MEASURE_RANGE, ATTR_CALLBACK_DATA, port->port.analogueIOport.IO.acqchan);
                SetCtrlAttribute (port->measPanel, MEASURE_LABEL, ATTR_CALLBACK_DATA, port->port.analogueIOport.IO.acqchan);
                SetCtrlAttribute (port->measPanel, MEASURE_COEFF, ATTR_CALLBACK_DATA, port->port.analogueIOport.IO.acqchan);
                SetCtrlAttribute (port->measPanel, MEASURE_NOTE, ATTR_CALLBACK_DATA, port->port.analogueIOport.IO.acqchan);
                SetCtrlAttribute (port->measPanel, MEASURE_ACQ, ATTR_CALLBACK_DATA, port->port.analogueIOport.IO.acqchan);
                SetPanelAttribute (port->measPanel, ATTR_TITLE, port->port.analogueIOport.IO.acqchan->channel->label);
                
                SetCtrlVal (port->measPanel, MEASURE_LABEL, port->port.analogueIOport.IO.acqchan->channel->label);
                SetCtrlVal (port->measPanel, MEASURE_RANGE, port->port.analogueIOport.range);
                SetCtrlVal (port->measPanel, MEASURE_COEFF, port->port.analogueIOport.IO.acqchan->coeff);
                SetCtrlVal (port->measPanel, MEASURE_NOTE, port->port.analogueIOport.IO.acqchan->note);
                SetCtrlVal (port->measPanel, MEASURE_ACQ, port->port.analogueIOport.IO.acqchan->acquire);
                DisplayPanel (port->measPanel);
            }
            break;
        case USBMENU_SOURCE_DAC1:
        case USBMENU_SOURCE_DAC2:
        case USBMENU_SOURCE_DAC3:
            {
                sourcePtr src = callbackData;
                switch(utilG.exp)
                {
                    case EXP_SOURCE: source_InitPanel(src); break;
                    case EXP_FLOAT : gensrc_InitPanel(src); break;
                }
            }
            break;
        case USBMENU_SOURCE_DAC4:
            {
                portPtr port = callbackData;
                boards_DigitalSourceInit(port);
            }
            break;
        case USBMENU_FILE_SAVE:
            boards_Save(callbackData, usb1208ls_Save);
            break;
        case USBMENU_FILE_LOAD:
            boards_Load(callbackData, usb1208ls_Load);
            break;
    }
}
开发者ID:homer362s,项目名称:DAAS_SOFT,代码行数:55,代码来源:USB-PMD1208LS.c

示例14: CAN_DibujarEtiqueta

/*****************************************************************************
.
. Función C:			CAN_DibujarEtiqueta
. Responsable:			César Armando Cruz Mendoza
. Descripcion: 			Dibuja la leyenda en la posicion indicada
. Parámetro de entrada:	int x | coordenada x de la marca
.						int y | coordenada y de la marca
.						char *pcCadena | cadena que se desea dibujar
. Parámetro de salida:	cero
. Fecha de creación:	18 de Febrero de 2011
.
*****************************************************************************/
int CAN_DibujarEtiqueta(int x, int y, char *pcCadena, int color)
{
	SetCtrlAttribute (iPanelCanvas, iControlCanvas, ATTR_PEN_COLOR,
					  color);
	SetCtrlAttribute (iPanelCanvas, iControlCanvas, ATTR_PEN_FILL_COLOR,
					  VAL_TRANSPARENT);
	
	CreateMetaFont ("Sincros01", VAL_APP_META_FONT, 14, 1, 0, 0, 0);
	
	CanvasDrawText (iPanelCanvas, iControlCanvas, pcCadena,
					"Sincros01", MakeRect (y+5, x+5, 20, 20), VAL_CENTER);
	
	return 0;
}
开发者ID:acm573,项目名称:Sincros,代码行数:26,代码来源:CAN_DespliegaInformacion.c

示例15: initChildPanels

/* 辅助函数-初始化六个子面板及各个面板上的内容 */	
void initChildPanels(void){
	/* 循环创建六个Panel */
	CPanels[0] = createChildPanel("xAxls-Accelerator", 0);
	CPanels[1] = createChildPanel("yAxls-Accelerator", 1);
	CPanels[2] = createChildPanel("zAxls-Accelerator", 2);
	CPanels[3] = createChildPanel("xAxls-Gyro", 3);
	CPanels[4] = createChildPanel("yAxls-Gyro", 4);
	CPanels[5] = createChildPanel("zAxls-Gyro", 5);
	for(int i = 0; i<validMonNum; i++){
		DisplayPanel (CPanels[i]);	
	}
	//在子Panel上创建图表,设置Graph属性,准备显示数据
	for(int i=0; i<validMonNum; i++){
		PGraphs[i] = NewCtrl(CPanels[i], CTRL_STRIP_CHART, 0, 0,0);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_WIDTH, cWidth);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_HEIGHT, cHeight);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_PLOT_BGCOLOR, plotBakgColor);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_GRID_COLOR, plotGridColor);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_EDGE_STYLE, VAL_FLAT_EDGE);		
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_SCROLL_MODE, VAL_CONTINUOUS);
		SetAxisScalingMode(CPanels[i], PGraphs[i], VAL_LEFT_YAXIS, graphScaleMode, yAxisRange[0], yAxisRange[1]);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_POINTS_PER_SCREEN, 50);
		//SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_YFORMAT,VAL_FLOATING_PT_FORMAT);
		SetTraceAttribute(CPanels[i],PGraphs[i], 1, ATTR_TRACE_COLOR, plotLineColor);
		//SetTraceAttribute(CPanels[i],PGraphs[i], 1, ATTR_PLOT_STYLE, VAL_CONNECTED_POINTS);
		SetCtrlAttribute(CPanels[i], PGraphs[i], ATTR_ANTI_ALIASED_PLOTS, 1);
	}
	manageGraphCallbackFunc();
	
}
开发者ID:HelloLyfing,项目名称:Signal_Monitor_System_Based_On_LabWindows-CVI,代码行数:31,代码来源:MainCode.c


注:本文中的SetCtrlAttribute函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。