GETN_OPTION_NUM_FORMAT
#define GETN_OPTION_NUM_FORMAT(_STRFMT) _tmpSubNode.SetAttribute(STR_ATTRIB_NUMFMT, _STRFMT);
Custom the showing numeric type in the dialog box.It affect the whole dialog box now.
EX1
#include <GetNbox.h> void GETN_OPTION_NUM_FORMAT_ex1() { GETN_TREE( treeTest ) double xx = pi; GETN_NUM(testVal, "value in 2 decimal", xx) GETN_OPTION_NUM_FORMAT( ".2" ) // gets current time SYSTEMTIME st; GetSystemTime(&st); double dDate; SystemTimeToJulianDate(&dDate, &st); GETN_NUM(testDate, "value in date format", dDate) GETN_OPTION_NUM_FORMAT( "D9" ) // 0 offset date format drop down, see LT manual if( GetNBox( treeTest )) out_tree( treeTest ); }
#include <GetNbox.h> void GETN_OPTION_NUM_FORMAT_ex2() { GETN_TREE( treeTest ) GETN_STR(test1, "Str Value", "junk") double xx = 0.5; GETN_NUM(testVal, "Fraction Test", xx) GETN_OPTION_NUM_FORMAT( "##/4" ) if( GetNBox( treeTest )) out_tree( treeTest ); }
GETN_NUM
GetNbox.h