CNiNumEdit

CNi

Class CNiNumEdit Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: ValidateControlNext page: AccelInc    
Class Declared in:
NiNumedit.h

'Overview' icon -- Shortcut to top of page. Overview

CNiNumEdit encapsulates the interface to a Measurement Studio ActiveX numeric edit control, which displays and facilitates the editing of numeric values.

CNiNumEdit is capable of responding to events that are generated by the control. For a list of the events that can be generated by this control and details on how to respond to the events in your program, refer to the Numeric Edit Events page.

Features

  • Range checking.
  • Increment and decrement buttons.
  • Control or indicator display style. A control accepts input from users, while an indicator displays only its current value.
  • Built-in numeric format styles, including scientific, symbolic engineering, scaling, time, and date.
  • CNiNumEdit includes bindable properties. You can bind these properties to a DataSocket source or target. This allows you to read property values from and write property values to the source or target. Click here for a list of bindable properties.

Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

'Data Items' icon -- Shortcut to top of page. Data Items

Public data double AccelInc Specifies the amount the value increments or decrements when the user holds down the increment or decrement button longer that the time specified by the AccelTime property.
Public data long AccelTime Specifies the number of seconds the increment or decrement button must be held down until the value is changed by the AccelInc value instead of the IncDecVal.
Public data Alignments Alignment Specifies how the text within the control is aligned.
Public data Appearances Appearance Specifies how the edit box portion of the control is drawn.
Public data CNiColor BackColor Specifies the background color of the edit box portion of the control.
Public data CNiColor BackgroundColor Specifies the background color of the increment and decrement buttons portion of the control.
Public data CNiBindings Bindings Gets a collection of binding objects associated with the control.
Public data BorderStyles BorderStyle Specifies the border around the edit box portion of the control.
Public data CNiColor ButtonColor Specifies the color of the increment and decrement buttons.
Public data ButtonStyles ButtonStyle Specifies the style of the increment and decrement buttons.
Public data bool Discrete Specifies if the control is in discrete or continuous mode.
Public data double DiscreteBase Specifies the interval to use in a discrete control.
Public data double DiscreteInterval Specifies the interval to use in a discrete control.
Public data bool Enabled Specifies if the user is able to interact with the control.
Public data CNiFont Font Specifies the font the control uses.
Public data CString FormatString Specifies the string that formats the value in the numeric edit control.
Public data Positions IncDecButtonPosition Specifies the location of the increment and decrement buttons on the control.
Public data bool IncDecButtonVisible Specifies if the increment and decrement buttons are visible.
Public data double IncDecValue Specifies the amount the value increments or decrements when the user clicks the increment or decrement button.
Public data double Maximum Specifies the maximum value of the control for range checking.
Public data double Minimum Specifies the minimum value of the control for range checking.
Public data NumEditModes Mode Specifies how the control operates.
Public data bool RangeChecking Specifies if the control enforces the minimum and maximum.
Public data CString Text Specifies the text that is displayed in the edit box.
Public data CNiColor TextColor Specifies the color of the text in the control.
Public data double Value Current value of the numeric edit control.

'Constructors' icon -- Shortcut to top of page. Constructors

Protected constructor

CNiNumEdit( CNiInterface::ThreadAccess option = CNiInterface::MultipleThreadsWithCaching )

'Destructors' icon -- Shortcut to top of page. Destructors

Protected destructor

~CNiNumEdit()

'Functions' icon -- Shortcut to top of page. Functions

Public function void

AboutBox()

Displays the About Box for the control.
Public function CNiPicture

ControlImage()

Returns an image of the entire control.
Protected function virtual BOOL

Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

Create( LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

CreateControl( LPCTSTR lpszClass, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Protected function BOOL

CreateControl( REFCLSID clsid, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL )

Creates the ActiveX control that is represented in the MFC program by this object.
Public function void

ExportStyle( LPCTSTR fileName )

Exports the style of the control to a file.
Protected function static const CLSID &

GetClsid()

Returns the globally unique identifier (GUID) of the ActiveX control to which this class connects.
Protected function static const IID &

GetIid()

Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects.
Public function void

ImportStyle( LPCTSTR fileName )

Imports a previously exported style.
Public function void

SetMinMax( double minimum, double maximum )

Sets the Minimum and Maximum properties.
Protected function void

ValidateControl()

Validates the current state of the control.