CMFCPropertyGridProperty::EnableSpinControl

Enables or disables a spin button control that is used to modify a property value.

void EnableSpinControl(
   BOOL bEnable=TRUE,
   int nMin=0,
   int nMax=0 
);

Parameters

  • [in] bEnable
    TRUE to enable the spin button control; FALSE to disable the spin button control. The default value is TRUE.

  • [in] nMin
    The minimum value of the spin button control. The default value is 0.

  • [in] nMax
    The maximum value of the spin button control. The default value is 0.

Remarks

The framework automatically creates a spin button control when a property is about to be edited.

The property type, which is specified by the varValue parameter of the CMFCPropertyGridProperty::CMFCPropertyGridProperty constructor, must be a supported variant type. Otherwise, this method asserts in debug mode. The supported types include VT_INT, VT_UINT, VT_I2, VT_I4, VT_UI2, and VT_UI4.

Requirements

Header: afxpropertygridctrl.h

See Also

Concepts

MFC Hierarchy Chart

Reference

CMFCPropertyGridProperty Class

CMFCPropertyGridProperty::CreateSpinControl