I am using CVI/Labwindows 5.0.1 on WinNT 4.0 and Win2000. I am using the easytab control.
When the displayed code is started 1544 bytes is allocated.
When the code the has discareded both the tab and the panel 132 bytes is left. Only discarting the panel would lead to the same results.
How can i fix this. There must be an error in the easyt tab code.
I also have a more complicated code in which i discovered the problem, but even this simple code displays the same problem.
///////////////////////////////////////////////////////
#include /* Needed if linking in external compiler; harmless otherwise */
#include
#include "Tabs.h"
#include "Easytab.h"
static int panelHandle;
static int Tab1;
static int Tab2
;
static int Tab;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0) /* Needed if linking in external compiler; harmless otherwise */
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "Tabs.uir", PANEL)) < 0)
return -1;
if ((Tab1 = LoadPanel (panelHandle, "Tabs.uir", TAB1)) < 0)
return -1;
if ((Tab2 = LoadPanel (panelHandle, "Tabs.uir", TAB2)) < 0)
return -1;
Tab = EasyTab_ConvertFromCanvas(panelHandle, PANEL_CANVAS);
EasyTab_AddPanels (panelHandle, Tab, 1, Tab1, 0);
EasyTab_AddPanels (panelHandle, Tab, 1, Tab2, 0);
DisplayPanel (panelHandle);
RunUserInterface ();
return 0;
}
int CVICALLBACK PanelEvent (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:
DiscardPanel(Tab);
//DiscardPanel(Tab1);
//DiscardPanel(Tab2);
DiscardPanel (pane
lHandle);
QuitUserInterface (0);
break;
}
return 0;
}
///////////////////////////////////////////////////////
Thanks,
Sebas