evolve4src/src/evolve/utility.cpp
void DDX_RangeValue(CDataExchange *pDX, int nIDC, int& value, int minval, int maxval)
{
	char buf[1000];
	CString str;

	ASSERT( pDX != NULL );

	if( pDX->m_bSaveAndValidate ) {
		DDX_Text(pDX, nIDC, str);
		value = atoi_comma(str);
		if( value < minval ) {
			value = minval;
		} else if( value > maxval ) {
			value = maxval;
		}
	} else {
		itoa_comma(buf, value);
		str = buf;
		DDX_Text(pDX, nIDC, str);
	}

}
/*
 * get/set value and make sure value is falls within min .. max (force
 * value to upper/lower bound if it falls outside this range)
 * strip commas, if present
 */
get/set value and make sure value is falls within min .. max (force
value to upper/lower bound if it falls outside this range)
strip commas, if present
get / set value and make sure value is falls within min .. max ( force value to upper / lower bound if it falls outside this range ) strip commas if present
void DDX_RangeValue(CDataExchange *pDX, int nIDC, int& value, int minval, int maxval)
{
	char buf[1000];
	CString str;
	ASSERT( pDX != NULL );
	if( pDX->m_bSaveAndValidate ) {
		DDX_Text(pDX, nIDC, str);
		value = atoi_comma(str);
		if( value < minval ) {
			value = minval;
		} else if( value > maxval ) {
			value = maxval;
		}
	} else {
		itoa_comma(buf, value);
		str = buf;
		DDX_Text(pDX, nIDC, str);
	}
}
void DDX_RangeValue ( CDataExchange * pDX , int nIDC , int & value , int minval , int maxval ) { char buf [ 1000 ] ; CString str ; ASSERT ( pDX != NULL ) ; if ( pDX -> m_bSaveAndValidate ) { DDX_Text ( pDX , nIDC , str ) ; value = atoi_comma ( str ) ; if ( value < minval ) { value = minval ; } else if ( value > maxval ) { value = maxval ; } } else { itoa_comma ( buf , value ) ; str = buf ; DDX_Text ( pDX , nIDC , str ) ; } }
get/set value and make sure value is falls within min .. max (force
 value to upper/lower bound if it falls outside this range)
 strip commas, if present
get / set value and make sure value is falls within min .. max ( force value to upper / lower bound if it falls outside this range ) strip commas if present