Public Types | |
enum | Format { year = 0x1, short_year = 0x2, month = 0x4, day = 0x8, hour = 0x10, minute = 0x20, second = 0x40, millisec = 0x80, date = day | month | year, short_date = day | month | short_year, time = hour | minute | second } |
Allowed formats. More... | |
Public Member Functions | |
CEmbeddedDateTimeCtrl (UINT format=short_date|time) | |
Constructor. | |
virtual | ~CEmbeddedDateTimeCtrl () |
Virtual destructor. | |
void | AddSlot (const Slot &slot) |
Adds a new logical slot. | |
Slots & | GetSlots () const |
Gets a list of logical slots. | |
void | RemoveSlots () |
Removes all slots. | |
void | SetFormat (UINT format) |
Sets a new format. | |
bool | ValueUp () |
Increments value in the selected slot. | |
bool | ValueDown () |
Decrements value in the selected slot. | |
void | SelectLeft () |
Selects the next slot in order. | |
void | SelectRight () |
Selects the previous slot in order. | |
void | SetCurrentSelection (int newSelection) |
Selects a slot with the specified index. | |
int | GetCurrentSelection () const |
Gets an index of the selected slot. | |
void | ApplyCalendar () |
Closes a child calendar window and sets the value received from the calendar to the date-time control. | |
void | CloseCalendar () |
Closes a child calendar window. | |
bool | HasCalendar () const |
Indicates whether this control has a child calendar window. | |
CRect | GetSpinRect () const |
Gets bounds of the spin control (for time style). | |
CRect | GetDropDownRect () const |
Gets bounds of the dropdown control (for date style). | |
bool | SetDateTime (long dt) |
Sets new time represented by 32-bit value that is the number of seconds elapsed since midnight, January 1, 1970. | |
bool | SetDateTime (__int64 dt) |
Sets new time represented by 64-bit value that is the number of 100-nanosecond intervals since January 1, 1601. | |
long | GetDateTime () const |
Gets a time, represented by 32-bit value. | |
bool | GetDateTime (__int64 &dt) const |
Gets a time, represented by 64-bit value. | |
Classes | |
struct | Slot |
Logical slot inside of the datetime control. More... |
enum Format |
CEmbeddedDateTimeCtrl | ( | UINT | format = short_date|time |
) |
Constructor.
[in] | format | Format of the control |
void AddSlot | ( | const Slot & | slot | ) |
Adds a new logical slot.
[in] | slot | A new logical slot to be added |
CEmbeddedDateTimeCtrl::Slots & GetSlots | ( | ) | const |
Gets a list of logical slots.
void SetFormat | ( | UINT | format | ) |
Sets a new format.
[in] | format | A new format |
void SetCurrentSelection | ( | int | newSelection | ) |
Selects a slot with the specified index.
[in] | newSelection | Zero-based index of logical slot |
int GetCurrentSelection | ( | ) | const |
Gets an index of the selected slot.
bool HasCalendar | ( | ) | const |
Indicates whether this control has a child calendar window.
CRect GetSpinRect | ( | ) | const |
Gets bounds of the spin control (for time style).
CRect GetDropDownRect | ( | ) | const |
Gets bounds of the dropdown control (for date style).
bool SetDateTime | ( | long | dt | ) |
Sets new time represented by 32-bit value that is the number of seconds elapsed since midnight, January 1, 1970.
[in] | dt | A new date or time, represented by 32-bit value |
bool SetDateTime | ( | __int64 | dt | ) |
Sets new time represented by 64-bit value that is the number of 100-nanosecond intervals since January 1, 1601.
[in] | dt | A new date or time, represented by 64-bit value |
long GetDateTime | ( | ) | const |
Gets a time, represented by 32-bit value.
bool GetDateTime | ( | __int64 & | dt | ) | const |
Gets a time, represented by 64-bit value.
[in,out] | dt | 64-bit datetime value. |
Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |