10-26-2006 01:30 PM
10-26-2006 02:42 PM
You are simply using GetCtrAttribute to retrieve a panel attribute, passing the panel ID as the control ID. This obviously cannot work.
I suggest you to use GetPanelAttribute (*mainPanel, ATTR_LEFT, &mainPanelAttr.left);
10-26-2006 03:13 PM
10-16-2014 08:49 AM
Hello
I'm a newbie labwindows,
so i'm having the same error i have two pannel when i press paue still the same erro here is a preview of the code and a pic of the panel
"
int CVICALLBACK PauseCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
PauseFlag = TRUE;
/*Timer Disabled When User Pauses*/
SetCtrlAttribute (panelHandle,TABPANEL_TIMER,ATTR_ENABLED,0);
SetPanelAttribute(TABPANEL_TIMER, ATTR_ENABLED,0);
TimerEnabled = FALSE;
/*Timer Disabled When User Pauses*/
/*Disable Use of Read/Write when timer is "paused"*/
SetCtrlAttribute (panelHandle, TABPANEL_gpibwrt, ATTR_DIMMED,1);
SetCtrlAttribute (panelHandle, TABPANEL_gpibwrt, ATTR_DIMMED,1);
/*Disable Use of Read/Write when timer is "paused"*/
SetCtrlAttribute (panelHandle, TABPANEL_CONTINUE, ATTR_DIMMED, 0);
SetCtrlAttribute (panelHandle, TABPANEL_PAUSE, ATTR_DIMMED, 1);
break;
case EVENT_RIGHT_CLICK:
break;
}
return 0;
}
"
10-16-2014 11:50 AM
Does the panelHandle variable that you're passing to the SetCtrlAttribute functions hold the tab panel id ("Tab Configuration") or the main panel id ("GPIB Communication")? My guess is that it holds the main panel id. You need to pass the tab panel id to those functions.
You can get the tab panel from the main panel by calling the GetPanelHandleFromTabPage function, or in this case, since it looks as if the pause button is in the same tab panel, you could just pass the panel variable that is passed to your PauseCB callback function.