Call DDV_MinMaxLong to verify that the value in the control associated with value falls between minVal and maxVal.

void AFXAPI DDV_MinMaxLong(
   CDataExchange* pDX,
   long value,
   long minVal,
   long maxVal 


  • pDX
    A pointer to a CDataExchange object. The framework supplies this object to establish the context of the data exchange, including its direction.

  • value
    A reference to a member variable of the dialog box, form view, or control view object with which data is validated.

  • minVal
    Minimum value (of type long) allowed.

  • maxVal
    Maximum value (of type long) allowed.


For more information about DDV, see Dialog Data Exchange and Validation.


Header: afxdd_.h

See Also


MFC Macros and Globals

Other Resources

Standard Dialog Data Validation Routines