Partilhar via


CSpinButtonCtrl::Create

Creates a spin button control and attaches it to a CSpinButtonCtrl object..

virtual BOOL Create(
   DWORD dwStyle,
   const RECT& rect,
   CWnd* pParentWnd,
   UINT nID 
);

Parameters

  • dwStyle
    Specifies the spin button control's style. Apply any combination of spin button control styles to the control. These styles are described in Up-Down Control Styles in the Windows SDK.

  • rect
    Specifies the spin button control's size and position. It can be either a CRect object or a RECT structure

  • pParentWnd
    A pointer to the spin button control's parent window, usually a CDialog. It must not be NULL.

  • nID
    Specifies the spin button control's ID.

Return Value

Nonzero if initialization was successful; otherwise 0.

Remarks

You construct a CSpinButtonCtrl object in two steps First, call the constructor, and then call Create, which creates the spin button control and attaches it to the CSpinButtonCtrl object.

To create a spin button control with extended window styles, call CSpinButtonCtrl::CreateEx instead of Create.

Requirements

Header: afxcmn.h

See Also

Reference

CSpinButtonCtrl Class

Hierarchy Chart

CSpinButtonCtrl::CSpinButtonCtrl

Other Resources

CSpinButtonCtrl Members