GETN_TIME

 

Name

GETN_TIME

Declaration

#define GETN_TIME(_NODE_NAME, _NODE_LABEL, _DEFAULT_VAL) _tmpSubNode = _tmpNode.AddNumericNode(_DEFAULT_VAL, #_NODE_NAME, TRGP_TIME);TREE_ADD_LABEL(_NODE_LABEL);

Remark

This macro creates a time picker edit box in the dialogbox.

Parameters

_NODE_NAME
[input] the name of the new node to be added to the tree
_NODE_LABEL
[input] the string value to show the time picker edit box name in the dialogbox
_DEFAULT_VAL
[input] umeric (JulianDate) contents as the default value to show in the edit box

Return

Examples

EX1

#include <GetNBox.h>
void GETN_TIME_ex1()
{     
        GETN_TREE(tree)
        
        SYSTEMTIME st;
        double dDate;
        GetSystemTime(&st);
        SystemTimeToJulianDate(&dDate, &st);
        GETN_TIME(Time, "Time", dDate)
        
        if ( GetNBox(tree) )
        {             
                dDate = tree.Time.dVal;
                string strDate = get_date_str(dDate);
                out_str(strDate);
        }
}

See Also

GETN_DATE, GETN_DATETIME_CUSTOM_FORMAT

Header to Include

GetNbox.h

Reference