2.2.6.29.4 SpinButton::SetBase

Description

Call this function to set the base for a spin button control. The base value determines whether the buddy window displays numbers in decimal or hexadecimal digits. Hexadecimal numbers are always unsigned; decimal numbers are signed.

Syntax

int SetBase( int nBase )

Parameters

nBase
New base value for the control. It can be 10 for decimal or 16 for hexadecimal.

Return

The previous base value if successful, or zero if an invalid base is given.

Examples

EX1

#include <Control.h>
#include <..\OriginLab\DialogEx.h>
#define IDC_SPIN1 1001

void SpinButton_SetBase(Dialog& MyDlg)
{
	SpinButton  m_spBtn = MyDlg.GetItem(IDC_SPIN1);
	int nBase = m_spBtn.SetBase(16);
}

Remark

See Also

Header to Include

Control.h