Filter Library | Camera | Interface Physics |
#include <ControlNumSpinCtrl.h>
Class CNumSpinCtrl enables you to:
Make sure that the control is included in method DoDataExchange() of the dialog classes where you use the spin control.
Class CNumSpinCtrl is a slightly modified version of the class CNumSpinCtrl by Damir Valiulin [NUMSPINCTRL].
Definition at line 177 of file ControlNumSpinCtrl.h.
Public Types | |
typedef double | real_type |
real number type | |
typedef long | integer_type |
integer number type | |
Public Member Functions | |
Operators | |
operator double () | |
convert to double. | |
operator int () | |
convert to int. | |
operator long () | |
convert to long. | |
operator unsigned long () | |
convert to unsigned long. | |
self & | operator= (double value) |
assign double. | |
self & | operator= (int value) |
assign int. | |
self & | operator= (long value) |
assign long. | |
self & | operator= (unsigned long value) |
assign unsigned long. | |
self & | operator++ () |
pre-increment with delta. | |
void | operator++ (int) |
post-increment with delta (returns void). | |
self & | operator-- () |
pre-decrement with delta. | |
void | operator-- (int) |
post-decrement with delta (returns void). | |
Accessors | |
void | GetRangeAndDelta (real_type &lower, real_type &upper, real_type &delta) |
obtain the lower and higher limits and the delta value. | |
double | GetPos () |
the current position. | |
integer_type | GetPosInt () |
the current position as integer. | |
Mutators | |
void | SetRangeAndDelta (real_type lower, real_type upper, real_type delta) |
set the lower and higher limits and the delta value. | |
void | SetPos (double value) |
set the new position. | |
void | SetPos (int value) |
set the new positon. | |
void | SetPos (long value) |
set the new positon. | |
void | SetPos (unsigned long value) |
set the new positon. | |
void | SetFormat (LPCTSTR lpszFormatString=NULL) |
set the printf-like format string (NULL yields "%g"). | |
void | Select () |
focus this control and select its contents. | |
Protected Member Functions | |
virtual void | PreSubclassWindow () |
allow other necessary subclassing to occur before the window is subclassed. | |
void | InitSpinCtrl () |
check that Set-Buddy-Integer is unset and set the control's range via SetRangeAndDelta(). | |
void | SetIntPos (real_type pos) |
set the underlying SpinButtonCtrl's position. | |
void | SetValueForBuddy (real_type val) |
set the contents of the buddy edit control. | |
afx_msg BOOL | OnDeltapos (NMHDR *pNMHDR, LRESULT *pResult) |
handle position-change message, set buddy contents via SetValueForBuddy(). | |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
handle create message, calls InitSpinCtrl(). | |
Protected Attributes | |
real_type | m_MinVal |
minimum value | |
real_type | m_MaxVal |
maximum value | |
real_type | m_Delta |
stepping value | |
UINT | m_IntRange |
minimum value | |
CString | m_csFormat |
printf format string | |
Private Types | |
typedef CNumSpinCtrl | self |
this type |