GETN_OPTION_EVENT
#define GETN_OPTION_EVENT(_PFN) {PEVENT_FUNC __dfn = _PFN;DWORD _dw_fn = (DWORD)__dfn;if(_dw_fn) {_strTemp = _dw_fn;_tmpSubNode.SetAttribute(STR_ATTRIB_HANDLER, _strTemp);}}
Add event handler at row level.
EX1
#include <GetNbox.h> void GETN_OPTION_EVENT_ex1() { GETN_TREE(testTree) GETN_NUM(Factor, "Scale Factor", 12.3) GETN_BUTTON(Path, "File path", GetAppPath()) GETN_OPTION_EVENT(GetN_option_event) if(GetNBox(testTree, NULL, NULL, NULL, NULL)) out_tree(testTree); } bool GetN_option_event(TreeNode& myTree, int nRow, int nType, Dialog& theDlg) { if(TRGP_STR_BUTTON == nType && nRow >= 0) { string strPath = BrowseGetPath(myTree.Path.strVal); myTree.Path.strVal = strPath; return true; } else return false; }
GETN_OPTION_EVENT_EX, GETN_SET_EVENT_EX_HANDLER
GetNbox.h