Hi,
You can try to make one function for one dialog, and then call these functions accordingly. For example:
void GETN_ex()
{
GETN_TREE(tr)
GETN_STR(type, "Type", "Name")
GetNBox(tr, NULL, NULL, NULL, NULL);
string strType = tr.type.strVal;
if(strType == "Name") // If input is "Name", open the dialog for name
{
Tree tr;
tr = GETN1();
out_tree(tr);
}
else if(strType == "Age") // If input is "Age", open the dialog for age
{
Tree tr;
tr = GETN2();
out_tree(tr);
}
}
Tree GETN1()
{
GETN_TREE(tr)
GETN_STR(name, "Name", "Jacky")
GetNBox(tr, NULL, NULL, NULL, NULL);
return tr;
}
Tree GETN2()
{
GETN_TREE(tr)
GETN_NUM(age, "Age", 31)
GetNBox(tr, NULL, NULL, NULL, NULL);
return tr;
}
Penn