GETN_DATETIME_CUSTOM_FORMAT
#define GETN_DATETIME_CUSTOM_FORMAT(_STRFMT) _tmpSubNode.SetAttribute(STR_ATTRIB_DATE_TIME_CUSTOM_FORMAT, _STRFMT);
This macro custom format of date/time picker edit box in the dialogbox.
EX1
#include <GetNBox.h> void GETN_DATETIME_CUSTOM_FORMAT_EX1() { SYSTEMTIME st; double dDate; GetSystemTime(&st); SystemTimeToJulianDate(&dDate, &st); GETN_TREE(tree) GETN_DATE(DateEx, "Custom Date", dDate) GETN_DATETIME_CUSTOM_FORMAT( "MMM/dd (dddd) hh" ) GETN_TIME(TimeEx, "Custom Time", dDate) GETN_DATETIME_CUSTOM_FORMAT( "hh:mm:ss tt" ) if ( GetNBox(tree) ) { dDate = tree.DateEx.dVal; JulianDateToSystemTime(&dDate, &st); string strDate = get_date_str(dDate, LDF_SHORT); out_str(strDate); dDate = tree.TimeEx.dVal; JulianDateToSystemTime(&dDate, &st); string strTime; strTime.Format("Custom Time: %d:%d:%d", st.wHour, st.wMinute, st.wSecond); out_str(strTime); } }
GETN_TIME, GETN_DATE
GetNbox.h