Udostępnij za pośrednictwem


CSpinButtonCtrl::GetPos

Retrieves the current position of a spin button control.

int GetPos( ) const; 
int GetPos32( 
   LPBOOL lpbError = NULL  
) const;

Parameters

  • lpbError
    A pointer to a boolean value that is set to zero if the value is successfully retrieved or non-zero if an error occurs. If this parameter is set to NULL, errors are not reported.

Return Value

The first version returns the 16-bit current position in the low-order word. The high-order word is nonzero if an error occurred.

The second version returns the 32-bit position.

Remarks

When it processes the value returned, the control updates its current position based on the caption of the buddy window. The control returns an error if there is no buddy window or if the caption specifies an invalid or out-of-range value.

Requirements

Header: afxcmn.h

See Also

Reference

CSpinButtonCtrl Class

Hierarchy Chart

CSpinButtonCtrl::SetPos

Other Resources

CSpinButtonCtrl Members