I have taken the simpdemo example from Labwindows/CVI and tried to modify it. I have put the tab panel ID's in an array and added 3 controls to the HELP panel which I duplicate 6 times. These control ID's are again put in an array.
The code is like this:
panel = LoadPanel(0, "simpdemo.uir", PANEL);
/* Two function calls and, Voila!, a tab sheet dialog */
tabCtrl = EasyTab_ConvertFromCanvas(panel, PANEL_CANVAS);
EasyTab_LoadPanels (panel, tabCtrl, 1, "simpdemo.uir", __CVIUserHInst, CONTROL, &panelArray[0],
VALVES, &panelArray[1], MONITOR, &panelArray[2], CONFIG, &panelArray[3], HELP, &panelArray[4], 0);
Init();
InstallPopup(panel);
RunUserInterface();
return 0;
}
int Ini
t(void)
{
int i,
status,
Top,
Left;
Top = 260;
Left = 50;
for(i=0; i<6; i++)
{
Num1Array[i] = DuplicateCtrl(panelArray[4], HELP_NUMERIC_1, panelArray[4], "", Top, Left);
Num2Array[i] = DuplicateCtrl(panelArray[4], HELP_NUMERIC_2, panelArray[4], "", Top, Left+79);
TextArray[i] = DuplicateCtrl(panelArray[4], HELP_TEXT, panelArray[4], "", Top, Left+165);
Top = Top + 22;
}
DiscardCtrl(panelArray[4], HELP_NUMERIC_1);
DiscardCtrl(panelArray[4], HELP_NUMERIC_2);
DiscardCtrl(panelArray[4], HELP_TEXT);
return(0);
}
panelArray[5]; Num1Array[6];Num2Array[6];TextArray[6];panel and tabCtrl are global variables.
The problem is that I get a general protection error message, which has something to do with threads, with which I am not very familiar currently. Is there any way around this problem or do I need to get some insight i
nto threads ?
Any help would be appreciated.
Erik Wegman
email ewegman@csir.co.za