Hi,
GetN support event function to handle this case, please see:
int testEvent(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg)
{
TreeNode trN = tree_get_node(tr, nRow); // get changed tree node
if( trN && trN.tagName == "test")
{
tr.Value.dVal = trN.nVal;
}
return 0;//no error
}
void testGetNApplyButton()
{
GETN_TREE(tr)
GETN_CHECK(test, "Yes or No", 0)
GETN_NUM(Value, "Value", 0)
if( GetNBox(tr, testEvent) )
{
// enter here if click OK button
out_tree(tr);
}
}
Compile and run "testGetNApplyButton", click check box, Value control will be changed.
Iris