CXTDateTimeCtrl |
Post Reply |
Author | |
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
Posted: 25 February 2008 at 7:58pm |
Hi all
I'm struggling with what should be the simple task of using CXTDateTimeCtrl to edit a duration (delay) value. I want to be able to edit delays from 0s to 1day in HH:MM:SS format, but the format specifiers for the control don't even have SS option, and it seems to use GMT -> local time conversion so I'm getting garbage.
Is there an easier way?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
hi,
use SetFormat method. See DTM_SETFORMAT in MSDN
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
|
yep, I read that.
Problem is CTime offsets everything to a GMT time, so my numbers are starting with my timezone, i.e. I enter 60 (being seconds), and I get back 01:01:00 in the control. I set the range from CTime(0) to CTime(24*60*60), but the actual range goes from 1am to 11am only.
What would be great would be a dedicated CDurationCtrl.
I looked at Mask edit as well, but it's not suited to time values, since all numerics are 0-9, which is no good for minutes, seconds etc.
Maybe should extend the mask edit format specifier to allow sub-ranges, i.e. instead of mask of 00:00:00, you could have
02d[0-24]:02d[0-59]:02d[0-59]
or some regex expression for validation. Otherwise I guess it's time to handle control feedback messages and do my own input validation.
|
|
rsvihalek
Groupie Joined: 21 August 2009 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hello everybody,
I need to edit duration (= delay) too, is there any simple way to do that with the XTremeToolkit Pro? Thank you for the reply |
|
rsvihalek
Groupie Joined: 21 August 2009 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
So I've found solution, the time has to be set using SYSTEMTIME structure - it is working properly for delay values without any conversion
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |