GETN_OPTION_EVENT_EX

 

Name

GETN_OPTION_EVENT_EX

Declaration

#define GETN_OPTION_EVENT_EX(_PFN)        {PEVENT_NODE_FUNC __dfn = _PFN;DWORD _dw_fn = (DWORD)__dfn;if(_dw_fn) {_strTemp = _dw_fn;_tmpSubNode.SetAttribute(STR_ATTRIB_HANDLER_RC, _strTemp);}}

Remark

A more general version of tree node event handler that will receive both row and column positions. Dialog is replaced by WndContainer to allow support for GetN tree inside splitter control etc.

Parameters

_PFN
the function name of the event.

Return

Examples

EX1

#include <GetNbox.h>
void GETN_OPTION_EVENT_Ex_ex1()
{
        GETN_TREE(testTree)
        GETN_NUM(Factor, "Scale Factor", 12.3)
        GETN_BUTTON(Path, "File path", GetAppPath())
        GETN_OPTION_EVENT_EX(GetN_option_event_ex) 
        if(GetNBox(testTree, NULL, NULL, NULL, NULL))
        out_tree(testTree);
}
bool GetN_option_event_ex(TreeNode& myTree, int nRow, int nCol, TreeNode& trNode, DWORD dwCntrl, int nType, WndContainer& theDlg)
{
        printf("row = %d, col=%d, cntrl=%X, type = %d\n", nRow, nCol, dwCntrl, nType);

        if(TRGP_STR_BUTTON == nType && nRow >= 0 && !(dwCntrl & GETNEVENT_ON_INIT))
        {
                string strPath = BrowseGetPath(myTree.Path.strVal);
                myTree.Path.strVal = strPath;
                return true;
        }
        else
                return false;
}

See Also

GETN_OPTION_EVENT, GETN_SET_EVENT_EX_HANDLER

header to Include

GetNbox.h

Reference