GETN_SPINNOR_DOUBLE
#define GETN_SPINNOR_DOUBLE(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL, _COMBO_STR) _strTemp = _DEFAULT_VAL; _tmpSubNode = _tmpNode.AddTextNode(_strTemp, #_NODE_NAME, ONODETYPE_EDIT_BOX_FLOAT_SPINOR);TREE_ADD_LABEL(_NODE_LABEL);TREE_ADD_LABEL(_NODE_LABEL);_tmpSubNode.SetAttribute(STR_COMBO_ATTRIB, _COMBO_STR);
This macro is used to construct a spinner on dynamic control
EX1
#include <GetNbox.h> void GETN_SPINNOR_DOUBLE_ex1() { GETN_BOX(trRoot) GETN_SPINNOR_DOUBLE(Value, "Value", 0.9, "0.0|0.2|6") //start at 0.0, increment as 0.2 steps = 6, and there can be 6+1 different values if ( GetNBox(trRoot) ) out_tree(trRoot); return; }
EX2
#include <GetNbox.h> static int _event_func_ex(TreeNode& tr, int nRow, int nEvent, DWORD& dwEnables, LPCSTR lpcszNodeName, WndContainer& getNContainer, string& strAux, string& strErrMsg) { if(lstrcmpi(lpcszNodeName, "Value") == 0) { out_double("", tr.Value.dVal); } return true; } void GETN_SPINNOR_DOUBLE_ex2() { GETN_BOX(trRoot) GETN_SPINNOR_DOUBLE(Value, "Value", 2, "0.0|0.5|10") if( GetNBox( trRoot, _event_func_ex )) out_tree(trRoot); return; }
GetNBox.h