![]() |
CNiSlide | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiSlide.h |
Overview
CNiSlide encapsulates the interface to the Measurement Studio ActiveX slide control, which represents different types of linear displays.
CNiSlide 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 Slide Events page.
Features
- Different display styles - vertical and horizontal slides, tanks, and thermometers.
- Ability to use the CNiAxis class to interface to a single axis of a slide control. This allows you to modify the appearance and behavior of the axis.
- Automatic axis labeling with numeric scales (log or inverted) and values (continuous or discrete).
- Multiple pointers, each one representing one scalar value.
- Custom ticks, labels, and value pairs. Ticks are the divisions that represent values on the slide. Labels display the value of each tick. Value pairs are names paired with a value. For example, use a value pair to add the text label "Boiling Point" to the value 212 F.
- Built-in format styles, including scientific, symbolic engineering, scaling, time, and date, for the labels.
- Animation - you can animate different parts of the control. For example, you might want to animate a pointer if its value exceeds a safe limit in the application.
- Custom images - you can add images to different parts of the control, including the background and pointers.
CNiSlide 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.
Base Classes
Data Items
![]() |
CNiPointer | ActivePointer | Specifies the CNiPointer object of the active pointer. |
![]() |
CNiAxis | Axis | Returns the CNiAxis object for this control. |
![]() |
CNiColor | BackColor | Specifies the background color of the control. |
![]() |
CNiBindings | Bindings | Gets a collection of binding objects associated with the control. |
![]() |
CString | Caption | Specifies the text that appears in the control. |
![]() |
CNiColor | CaptionColor | Specifies the color of the caption. |
![]() |
CNiControlMetrics | ControlMetrics | Returns the CNiControlMetrics object associated with this control. |
![]() |
bool | Enabled | Specifies if the control responds to user input. |
![]() |
CNiFont | Font | Specifies the font for the caption and axis labels. |
![]() |
CNiColor | ForeColor | Specifies the color of many objects in the CNiSlide or CNiKnob control. |
![]() |
bool | ImmediateUpdates | Specifies if the control draws new data as soon as it is available or if the form refreshes the control when it draws other controls. |
![]() |
double | IncDecValue | Specifies the value by which the pointer value is incremented/decremented when you click on the increment or decrement buttons use the keyboard to increment or decrement the pointer. |
![]() |
CNiColor | InteriorColor | Specifies the color used to paint the interior of several types of slide styles. |
![]() |
KeyboardModes | KeyboardMode | Specifies how the control handles keyboard input from the user. |
![]() |
CNiPointers | Pointers | Gets a collection of pointer objects associated with the control. |
![]() |
long | ReadyState | Returns the ready state of the control. |
![]() |
ShowFocusModes | ShowFocusMode | Specifies how the control indicates that it has the focus. |
![]() |
double | Value | Specifies the value of the active pointer. |
![]() |
long | ValuePairIndex | Specifies the index of the value pair selected by the active pointer. |
![]() |
bool | Windowless | Specifies if the control has a window. |
Constructors
![]() |
CNiSlide( CNiInterface::ThreadAccess option = CNiInterface::MultipleThreadsWithCaching ) |
Destructors
Functions
![]() |
void | AboutBox() |
Displays the About Box for the control. |
![]() |
CNiPicture | Returns an image of the entire control. | |
![]() |
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. |
![]() |
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. |
![]() |
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. |
![]() |
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. |
![]() |
void | ExportStyle( LPCTSTR fileName ) |
Exports the style of the control to a file. |
![]() |
static const CLSID & | GetClsid() |
Returns the globally unique identifier (GUID) of the ActiveX control to which this class connects. |
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
CNiImage | Images( long itemIndex ) |
Gets the image object associated with the specified part of the CNiSlide control. |
![]() |
CNiImage | Gets the image object associated with the specified part of the CNiSlide control. | |
![]() |
void | ImportStyle( LPCTSTR fileName ) |
Imports a previously exported style. |
![]() |
void | Refresh() |
Forces the control to redraw. |
![]() |
void | SetBuiltinStyle( SlideStyles style ) |
Sets many properties of the control to represent the new style specified. |
![]() |
void | Validates the current state of the control. |