Bagikan melalui


CMFCSpinButtonCtrl Class

The CMFCSpinButtonCtrl class supports a visual manager that draws a spin button control.

class CMFCSpinButtonCtrl : public CSpinButtonCtrl

Members

Public Constructors

Name

Description

CMFCSpinButtonCtrl::CMFCSpinButtonCtrl

Default constructor.

CMFCSpinButtonCtrl::~CMFCSpinButtonCtrl

Destructor.

Public Methods

Name

Description

CMFCSpinButtonCtrl::OnDraw

Repaints the current spin button control.

Remarks

To use a visual manager to draw a spin button control in your application, replace all instances of the CSpinButtonCtrl class with the CMFCSpinButtonCtrl class.

Example

The following example demonstrates how to create an object of the CMFCSpinButtonCtrl class and use its Create method.

    CMFCSpinButtonCtrl* pWndSpin = new CMFCSpinButtonCtrl;
    CRect rectSpin(1,1,10,10);
    CMFCPropertyGridCtrl* pWndList = new CMFCPropertyGridCtrl();
    if (!pWndSpin->Create(WS_CHILD | WS_VISIBLE | UDS_ARROWKEYS | UDS_SETBUDDYINT | UDS_NOTHOUSANDS, rectSpin, pWndList, AFX_PROPLIST_ID_INPLACE))
    {
        return 0;
    }

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CSpinButtonCtrl

            CMFCSpinButtonCtrl

Requirements

Header: afxspinbuttonctrl.h

See Also

Reference

Hierarchy Chart

CMFCVisualManager Class

Other Resources

MFC Classes