Hi,
Below is an example show you how to do it:
#include <Origin.h>
#include <GetNbox.h>
////////////////////////////////////////////////////////////////////////////////////
int test_event1(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg)
{
TreeNode trNum = tr.MyNum;
int nUseAuto = tr.UseAuto.nVal;
if ( nUseAuto )
{
octree_set_auto_support(&trNum, AUTO_CHECKED);
}
else
{
octree_set_auto_support(&trNum, AUTO_NOT_SUPPORT);
}
tr.MyHide.SetAttribute(STR_LABEL_ATTRIB, nUseAuto ? "Enable Auto 1" : "Enable Auto 2");
return true;
}
int test_getn_ex_ex_ex()
{
GETN_TREE(tr);
GETN_NUM(MyNum, "Money", 2) GETN_ADD_AUTO(1)
GETN_CHECK(UseAuto, "Enable Auto", 1);
GETN_NUM(MyHide, "Hide", 2) GETN_CURRENT_SUBNODE.Show = 0;
if ( GetNBox(tr, test_event1, "Data Generator", "Test", GetWindow()) )
{
return 0;
}
return 1;
}
Regards!
Sean
OriginLab Tech.