2.3.1.84 GETN_SET_EVENT_EX_HANDLER


Name

GETN_SET_EVENT_EX_HANDLER

Declaration

#define GETN_SET_EVENT_EX_HANDLER(_TR, _PFN)	GETN_SET_EVENT_EX_HANDLER_ATT(_TR, _PFN, STR_ATTRIB_HANDLER_RC)

Remark

This macro is used to set treenode event handler. For detail usage, please see GETN_OPTION_EVENT_EX

Parameters

_TR
[input/modified] the node to set event handler.
_PFN
[input] event handler.

Return

Examples

EX1

#include <GetNbox.h>

bool node_event(TreeNode& tr, int nRow, int nCol, TreeNode& trNode, DWORD nEventInfo, int nCntrlType, WndContainer& getNContainer)
{
	//see GETN_OPTION_EVENT_EX example
	return true;
}
void GETN_SET_EVENT_EX_HANDLER_ex1()
{
    GETN_TREE(trRoot)
    GETN_STR(STR, "Event", "Click me") //change the text will invoke event handler
    GETN_SET_EVENT_EX_HANDLER(trRoot.STR, node_event)
    if ( GetNBox(trRoot) )
        out_tree(trRoot);
    return;
}

See Also

GETN_OPTION_EVENT, GETN_OPTION_EVENT_EX

Header to Include

GetNBox.h

Reference